Bug 132902 - [EFL][WK2] Fix an unit test of ewk_context_url_scheme_register()
Summary: [EFL][WK2] Fix an unit test of ewk_context_url_scheme_register()
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: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks: 132813
  Show dependency treegraph
 
Reported: 2014-05-14 04:26 PDT by Gyuyoung Kim
Modified: 2014-05-14 22:08 PDT (History)
6 users (show)

See Also:


Attachments
WIP (2.27 KB, patch)
2014-05-14 04:29 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (2.76 KB, patch)
2014-05-14 18:49 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch for landing (2.52 KB, patch)
2014-05-14 21:28 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyuyoung Kim 2014-05-14 04:26:48 PDT
The unit test has been failed for a long time.
Comment 1 Gyuyoung Kim 2014-05-14 04:29:46 PDT
Created attachment 231443 [details]
WIP
Comment 2 Gyuyoung Kim 2014-05-14 18:49:55 PDT
Created attachment 231477 [details]
Patch
Comment 3 Anders Carlsson 2014-05-14 21:24:32 PDT
Comment on attachment 231477 [details]
Patch

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

> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context.cpp:128
> +#if ENABLE(CUSTOM_PROTOCOL)
>      ewk_context_url_scheme_register(ewk_view_context_get(webView()), "fooscheme", schemeRequestCallback, 0);
> -    ASSERT_TRUE(loadUrlSync("fooscheme:MyPath"));
> -    ASSERT_STREQ("Foo", ewk_view_title_get(webView()));
> +    ewk_view_url_set(webView(), "fooscheme:MyPath");
> +
> +    ASSERT_TRUE(waitUntilTrue(finishTest, testTimeoutSeconds));
> +#else
> +    ewk_context_url_scheme_register(ewk_view_context_get(webView()), "fooscheme", schemeRequestCallback, 0);
> +    ewk_view_url_set(webView(), "fooscheme:MyPath");
> +
> +    ASSERT_FALSE(waitUntilTrue(finishTest, testTimeoutSeconds));
> +#endif

Does the test even need to run at all when custom protocols are disabled? I'd just put the entire test inside #if ENABLE(CUSTOM_PROTOCOL) and get rid of the #else block.
Comment 4 Gyuyoung Kim 2014-05-14 21:28:41 PDT
Created attachment 231489 [details]
Patch for landing
Comment 5 Gyuyoung Kim 2014-05-14 21:29:44 PDT
(In reply to comment #3)
> (From update of attachment 231477 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=231477&action=review
> 
> > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context.cpp:128
> > +#if ENABLE(CUSTOM_PROTOCOL)
> >      ewk_context_url_scheme_register(ewk_view_context_get(webView()), "fooscheme", schemeRequestCallback, 0);
> > -    ASSERT_TRUE(loadUrlSync("fooscheme:MyPath"));
> > -    ASSERT_STREQ("Foo", ewk_view_title_get(webView()));
> > +    ewk_view_url_set(webView(), "fooscheme:MyPath");
> > +
> > +    ASSERT_TRUE(waitUntilTrue(finishTest, testTimeoutSeconds));
> > +#else
> > +    ewk_context_url_scheme_register(ewk_view_context_get(webView()), "fooscheme", schemeRequestCallback, 0);
> > +    ewk_view_url_set(webView(), "fooscheme:MyPath");
> > +
> > +    ASSERT_FALSE(waitUntilTrue(finishTest, testTimeoutSeconds));
> > +#endif
> 
> Does the test even need to run at all when custom protocols are disabled? I'd just put the entire test inside #if ENABLE(CUSTOM_PROTOCOL) and get rid of the #else block.

Removed #else block. Thanks.
Comment 6 WebKit Commit Bot 2014-05-14 22:07:58 PDT
Comment on attachment 231489 [details]
Patch for landing

Clearing flags on attachment: 231489

Committed r168892: <http://trac.webkit.org/changeset/168892>
Comment 7 WebKit Commit Bot 2014-05-14 22:08:06 PDT
All reviewed patches have been landed.  Closing bug.