Bug 90688 - [EFL][Wk2] WebErrorsEfl.cpp needs to return non-empty errors
Summary: [EFL][Wk2] WebErrorsEfl.cpp needs to return non-empty errors
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 90683 (view as bug list)
Depends on:
Blocks: 90788
  Show dependency treegraph
 
Reported: 2012-07-06 07:12 PDT by Dominik Röttsches (drott)
Modified: 2012-08-02 07:36 PDT (History)
13 users (show)

See Also:


Attachments
Patch (4.21 KB, patch)
2012-07-09 01:23 PDT, Keunsoon Lee
no flags Details | Formatted Diff | Diff
Patch (4.23 KB, patch)
2012-07-09 04:09 PDT, Keunsoon Lee
no flags Details | Formatted Diff | Diff
Patch (4.23 KB, patch)
2012-07-09 05:01 PDT, Keunsoon Lee
no flags Details | Formatted Diff | Diff
Patch (4.37 KB, patch)
2012-07-09 22:12 PDT, Keunsoon Lee
no flags Details | Formatted Diff | Diff
Patch (4.26 KB, patch)
2012-07-10 04:17 PDT, Keunsoon Lee
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Röttsches (drott) 2012-07-06 07:12:24 PDT
We need default errors for wk1 and wk2, let's move them to a common spot.
Comment 1 Dominik Röttsches (drott) 2012-07-06 07:27:48 PDT
Not sure about the refactoring, error codes might differ - let's put an implementation for Wk2 at least.
Comment 2 Dominik Röttsches (drott) 2012-07-06 07:34:32 PDT
With error implementations in place, we're down to about 400 failures compared to DRT.
Comment 3 Keunsoon Lee 2012-07-09 01:23:27 PDT
Created attachment 151210 [details]
Patch
Comment 4 Keunsoon Lee 2012-07-09 01:25:02 PDT
(In reply to comment #3)
> Created an attachment (id=151210) [details]
> Patch

This patch creates meaningful ResourceError for each case and return it.
Comment 5 Gyuyoung Kim 2012-07-09 03:38:43 PDT
Comment on attachment 151210 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=151210&action=review

> Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:41
> +    /* FIXME remove magic number -999 and string "NetworkErrorDomain".

Use // instead of /* ... */. Then, use *FIXME:*

> Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:42
> +     * application cannot understand those.

s/application/Application/g

> Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:43
> +     * should establish EFL port's error system */

Please write completed sentence.

> Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:74
> +    /* FIXME remove magic number -998 and string "NetworkErrorDomain".

ditto.
Comment 6 Keunsoon Lee 2012-07-09 04:09:28 PDT
Created attachment 151229 [details]
Patch
Comment 7 Keunsoon Lee 2012-07-09 04:11:38 PDT
(In reply to comment #5)
> (From update of attachment 151210 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=151210&action=review
> 
> > Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:41
> > +    /* FIXME remove magic number -999 and string "NetworkErrorDomain".
> 
> Use // instead of /* ... */. Then, use *FIXME:*
> 
> > Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:42
> > +     * application cannot understand those.
> 
> s/application/Application/g
> 
> > Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:43
> > +     * should establish EFL port's error system */
> 
> Please write completed sentence.
> 
> > Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:74
> > +    /* FIXME remove magic number -998 and string "NetworkErrorDomain".
> 
> ditto.

Hi,
I attached modified patch below.
Thank you for your review.
Comment 8 Gyuyoung Kim 2012-07-09 04:46:08 PDT
Comment on attachment 151229 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=151229&action=review

> Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:41
> +    // FIXME remove magic number -999 and string "NetworkErrorDomain".

Use *FIXME:*. s/remove/Remove/g
Comment 9 Keunsoon Lee 2012-07-09 05:01:39 PDT
Created attachment 151233 [details]
Patch
Comment 10 Keunsoon Lee 2012-07-09 05:03:46 PDT
(In reply to comment #8)
> (From update of attachment 151229 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=151229&action=review
> 
> > Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:41
> > +    // FIXME remove magic number -999 and string "NetworkErrorDomain".
> 
> Use *FIXME:*. s/remove/Remove/g

Sorry that I missed it.
Please refer to another patch; Created an attachment (id=151233) [details].
Comment 11 Gyuyoung Kim 2012-07-09 05:09:04 PDT
Comment on attachment 151233 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=151233&action=review

> Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:43
> +    // because application cannot understand those.

Could you file a bug for this issue? Then, write the url to here as well.
Comment 12 Keunsoon Lee 2012-07-09 05:43:59 PDT
(In reply to comment #11)
> (From update of attachment 151233 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=151233&action=review
> 
> > Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:43
> > +    // because application cannot understand those.
> 
> Could you file a bug for this issue? Then, write the url to here as well.

Sure.
Here is the bug id for the FIXME; https://bugs.webkit.org/show_bug.cgi?id=90783 .

Thanks again.
Comment 13 Gyuyoung Kim 2012-07-09 19:46:14 PDT
Comment on attachment 151233 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=151233&action=review

>>> Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:43
>>> +    // because application cannot understand those.
>> 
>> Could you file a bug for this issue? Then, write the url to here as well.
> 
> Sure.
> Here is the bug id for the FIXME; https://bugs.webkit.org/show_bug.cgi?id=90783 .
> 
> Thanks again.

I mean please mention the bug url to this FIXME: comment. Please see also below url.
http://trac.webkit.org/browser/trunk/Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp#L80
Comment 14 Keunsoon Lee 2012-07-09 22:12:10 PDT
Created attachment 151399 [details]
Patch
Comment 15 Keunsoon Lee 2012-07-09 22:13:16 PDT
(In reply to comment #13)
> (From update of attachment 151233 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=151233&action=review
> 
> >>> Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:43
> >>> +    // because application cannot understand those.
> >> 
> >> Could you file a bug for this issue? Then, write the url to here as well.
> > 
> > Sure.
> > Here is the bug id for the FIXME; https://bugs.webkit.org/show_bug.cgi?id=90783 .
> > 
> > Thanks again.
> 
> I mean please mention the bug url to this FIXME: comment. Please see also below url.
> http://trac.webkit.org/browser/trunk/Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp#L80

I uploaded new patch according to your guide; Created an attachment (id=151399).
Thanks.
Comment 16 Gyuyoung Kim 2012-07-09 22:29:12 PDT
Comment on attachment 151399 [details]
Patch

It seems this patch is based on QT port's implementation. LGTM now.
Comment 17 Chris Dumez 2012-07-09 22:30:20 PDT
(In reply to comment #16)
> (From update of attachment 151399 [details])
> It seems this patch is based on QT port's implementation. LGTM now.

Qt :P
Comment 18 Chris Dumez 2012-07-09 22:33:41 PDT
Comment on attachment 151399 [details]
Patch

LGTM as a first patch.
Comment 19 jochen 2012-07-10 03:02:40 PDT
Comment on attachment 151399 [details]
Patch

Can you add tests for this change?

View in context: https://bugs.webkit.org/attachment.cgi?id=151399&action=review

> Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:45
> +    return ResourceError("NetworkErrorDomain", -999,

what about defining the string NetworkErrorDomain as a constant, as it's used several times?

And define -999 and -998 as constants as well, so at least in this file, they have meaningful names?

> Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:46
> +            request.url().string(), "Request cancelled");

nit. should fit in one line (here and all other return statements in this change)
Comment 20 Keunsoon Lee 2012-07-10 04:17:53 PDT
Created attachment 151434 [details]
Patch
Comment 21 Keunsoon Lee 2012-07-10 04:18:41 PDT
(In reply to comment #19)
> (From update of attachment 151399 [details])
> Can you add tests for this change?
> 
> View in context: https://bugs.webkit.org/attachment.cgi?id=151399&action=review
> 
> > Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:45
> > +    return ResourceError("NetworkErrorDomain", -999,
> 
> what about defining the string NetworkErrorDomain as a constant, as it's used several times?
> 
> And define -999 and -998 as constants as well, so at least in this file, they have meaningful names?
> 
> > Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:46
> > +            request.url().string(), "Request cancelled");
> 
> nit. should fit in one line (here and all other return statements in this change)

Thanks for the review.
I attached new patch for your review; attachment (id=151434) .
Comment 22 jochen 2012-07-10 04:50:00 PDT
The code looks good.

Any reason you didn't add tests?
Comment 23 Keunsoon Lee 2012-07-10 05:26:51 PDT
(In reply to comment #22)
> The code looks good.
> 
> Any reason you didn't add tests?

That's because already there is a test case for it.
WTR is running now, and the pass rate will be improved with this patch.
I'm sorry that I cannot show you the actual result.
Comment 24 jochen 2012-07-10 05:43:42 PDT
(In reply to comment #23)
> (In reply to comment #22)
> > The code looks good.
> > 
> > Any reason you didn't add tests?
> 
> That's because already there is a test case for it.
> WTR is running now, and the pass rate will be improved with this patch.
> I'm sorry that I cannot show you the actual result.

Shouldn't you update some expectations from TEXT to PASS then?
Comment 25 Dominik Röttsches (drott) 2012-07-10 22:29:47 PDT
(In reply to comment #24)
> (In reply to comment #23)
> > (In reply to comment #22)
> > > The code looks good.
> > > 
> > > Any reason you didn't add tests?
> > 
> > That's because already there is a test case for it.
> > WTR is running now, and the pass rate will be improved with this patch.
> > I'm sorry that I cannot show you the actual result.
> 
> Shouldn't you update some expectations from TEXT to PASS then?

This patch improves pass rate on the WTR / WebKit2 based tests - they are not run on a bot yet. So, this patch shortens the delta that there is currently between WebKit2/WTR and Webkit(1) based DRT - that's why we'd like to have it in. The relevant tests are already executed.
Comment 26 jochen 2012-07-11 00:57:39 PDT
Ok, thanks for the clarification

This patch looks good to me then
Comment 27 Hajime Morrita 2012-07-11 02:20:12 PDT
Comment on attachment 151434 [details]
Patch

rubberstamping.
Comment 28 WebKit Review Bot 2012-07-11 02:54:40 PDT
Comment on attachment 151434 [details]
Patch

Clearing flags on attachment: 151434

Committed r122322: <http://trac.webkit.org/changeset/122322>
Comment 29 WebKit Review Bot 2012-07-11 02:54:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 30 Dominik Röttsches (drott) 2012-08-02 07:36:31 PDT
*** Bug 90683 has been marked as a duplicate of this bug. ***