Bug 166837 - Support webkit-test-runner key-value pairs in http tests in DumpRenderTree
Summary: Support webkit-test-runner key-value pairs in http tests in DumpRenderTree
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks: 165668
  Show dependency treegraph
 
Reported: 2017-01-09 04:17 PST by Antoine Quint
Modified: 2017-01-10 14:19 PST (History)
6 users (show)

See Also:


Attachments
Patch (4.74 KB, patch)
2017-01-09 05:18 PST, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2017-01-09 04:17:20 PST
With https://bugs.webkit.org/show_bug.cgi?id=149812, we added support for webkit-test-runner key-value pairs in http tests in WebKitTestRunner. We also need this to work with DumpRenderTree / WebKit1 so that we can get legacy media controls tests to work when modern media controls are on by default (see https://bugs.webkit.org/show_bug.cgi?id=165668).
Comment 1 Radar WebKit Bug Importer 2017-01-09 04:17:52 PST
<rdar://problem/29925855>
Comment 2 Antoine Quint 2017-01-09 05:18:17 PST
Created attachment 298343 [details]
Patch
Comment 3 Alexey Proskuryakov 2017-01-09 09:42:40 PST
The purpose of WKTR key value pairs is to add settings that require restarting WebContent process, and so it's by definition impossible to implement for DumpRenderTree.

The fact that it's implementable tells me that this was the wrong mechanism to enable modern media controls in tests. Why didn't a JS call work?
Comment 4 WebKit Commit Bot 2017-01-09 11:35:49 PST
Comment on attachment 298343 [details]
Patch

Clearing flags on attachment: 298343

Committed r210517: <http://trac.webkit.org/changeset/210517>
Comment 5 WebKit Commit Bot 2017-01-09 11:35:54 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Antoine Quint 2017-01-10 07:30:26 PST
(In reply to comment #3)
> The fact that it's implementable tells me that this was the wrong mechanism
> to enable modern media controls in tests. Why didn't a JS call work?

The value of using a WKTR key-value pair is that the setting can be set prior to any media element being created inside the test. Using a JS call would have required for all media tests that wish to set a different value than the default to dynamically create the media element after calling JS to change it.
Comment 7 Alexey Proskuryakov 2017-01-10 14:19:11 PST
My understanding is that the markup for the media element won't be parsed until preceding JS executes. In other words, this should work due to the way HTML parser works, (and it works that way because of document.write()):

<script>
internals.enableModernMediaControls();
</script>
<video>...</video>