Bug 103886 - Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner
Summary: Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 104148 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-03 06:07 PST by Zoltan Nyul
Modified: 2012-12-11 05:52 PST (History)
6 users (show)

See Also:


Attachments
patch (7.93 KB, patch)
2012-12-04 00:05 PST, Zoltan Nyul
buildbot: commit-queue-
Details | Formatted Diff | Diff
patch (9.08 KB, patch)
2012-12-05 03:04 PST, Zoltan Nyul
no flags Details | Formatted Diff | Diff
patch (10.44 KB, patch)
2012-12-05 05:03 PST, Zoltan Nyul
no flags Details | Formatted Diff | Diff
patch (10.37 KB, patch)
2012-12-05 05:25 PST, Zoltan Nyul
kenneth: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
patch (10.48 KB, patch)
2012-12-10 05:01 PST, Zoltan Nyul
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltan Nyul 2012-12-03 06:07:53 PST
Tests
fast/media/media-query-list-02.html
fast/media/media-query-list-03.html
fast/media/media-query-list-04.html
fast/media/media-query-list-05.html
fast/media/media-query-list-06.html
fast/media/media-query-list-07.html
fast/media/view-mode-media-feature.html 
are skipped because WebKitTestRunner lacks method setViewModeMediaFeature().
Comment 1 Zoltan Nyul 2012-12-04 00:05:31 PST
Created attachment 177428 [details]
patch
Comment 2 Build Bot 2012-12-04 00:32:21 PST
Comment on attachment 177428 [details]
patch

Attachment 177428 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15106880
Comment 3 Zoltan Nyul 2012-12-05 03:04:48 PST
Created attachment 177710 [details]
patch
Comment 4 Chris Dumez 2012-12-05 03:17:26 PST
Comment on attachment 177710 [details]
patch

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

> LayoutTests/ChangeLog:8
> +        Unskipping the following tests:

... for EFL WebKit2.

> Source/WebCore/ChangeLog:8
> +        Export WebCore::Page::setViewMode method to WebKit(2).

"Export symbol for WebCore::Page::setViewMode on Mac." ?

> Source/WebCore/ChangeLog:10
> +        No new tests (OOPS!).

You should indicate something like:
"No new tests, no behavior change for layout tests."

> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:456
> +    WebCore::Page* page = toImpl(pageRef)->corePage();

It is uncommon to access the WebCore page from WKBundlePage I believe. I would usually add a new method to WebPage and call that one from WKBundlePage. WKBundlePage is usually just a C wrapper around WebPage API.

> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:468
> +        page->setViewMode(WebCore::Page::ViewModeMinimized);

Maybe an ASSERT_NOT_REACHED(); at this end of this function just in case?

> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h:398
> +WK_EXPORT void WKBundlePageSetViewMode(WKBundlePageRef pageRef, WKStringRef mode);

Unless there is a specific need to this to be public, it should probably go to WKBundlePagePrivate.h. At least so far it is used by WKTR only.

> Tools/ChangeLog:3
> +        [WK2][WTR] Enable view mode media feature layout test

"Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner" may be a better title.

> Tools/ChangeLog:8
> +        InjectedBundle API extended to set view mode media feature.

"Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner." ?
Comment 5 Zoltan Nyul 2012-12-05 05:03:41 PST
Created attachment 177731 [details]
patch
Comment 6 Chris Dumez 2012-12-05 05:12:05 PST
Comment on attachment 177731 [details]
patch

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

> Source/WebKit2/ChangeLog:17
> +        which are going to be unskipped in bug #103886.

I would remove this line since this is the same bug.

> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:455
> +    

Unneeded blank line

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:1139
> +void WebPage::setViewMode(WebCore::Page::ViewMode mode)

You do not need WebCore:: here.
Comment 7 Zoltan Nyul 2012-12-05 05:25:28 PST
Created attachment 177732 [details]
patch
Comment 8 WebKit Review Bot 2012-12-10 02:53:12 PST
Comment on attachment 177732 [details]
patch

Rejecting attachment 177732 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
ebPage/WebPage.h
patching file Tools/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
patching file Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Hunk #1 succeeded at 882 (offset -2 lines).
patching file Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Kenneth Ro..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue

Full output: http://queues.webkit.org/results/15219894
Comment 9 Zoltan Nyul 2012-12-10 05:01:59 PST
Created attachment 178521 [details]
patch

There was a Changelog conflict, this patch fixes it.
Comment 10 WebKit Review Bot 2012-12-10 06:58:38 PST
Comment on attachment 178521 [details]
patch

Clearing flags on attachment: 178521

Committed r137148: <http://trac.webkit.org/changeset/137148>
Comment 11 WebKit Review Bot 2012-12-10 06:58:43 PST
All reviewed patches have been landed.  Closing bug.
Comment 12 Jussi Kukkonen (jku) 2012-12-11 05:52:42 PST
*** Bug 104148 has been marked as a duplicate of this bug. ***