Chromium Code Reviews
DescriptionUse correct WebView from TestRunner methods called via testRunner bindings.
TestRunner provides javascript bindings for test functions that tests
can use for various functionality. Some of these test functions operate
on global state - for example:
*) testRunner.dumpAsText (test flag affecting test behavior)
*) testRunner.setAllowDisplayOfInsecureContent (test flag affecting product
behavior)
*) testRunner.setTextSubpixelPositioning (directly interacts with product).
Some of these test functions operate on a specific view - for example:
*) testRunner.capturePixelsAsyncThen
*) testRunner.setPageVisibility
View-specific functions should operate on a view associated with the
view of the frame that the javascript is calling from (rather then on
the main window's view). To accomplish this the CL splits view-specific
functionality of TestRunner into a separete TestRunnerForSpecificView
class (with one instance per WebTestProxyBase).
This CL is important to enable setting TestRunner::web_view_ only to the
actual main test window (rather than to the first WebView/RenderView
that happens to be created in a given renderer process) - see the
planned https://crrev.com/1896623002. Without the current CL javascript
calls from a DevTools window would cease to work (they would encounter a
null TestRunner::web_view_ and failsafe, rather than using the DevTools
view from which javascript calls them). Repro test case would be
running layout tests under inspector/ directory (with or without
--site-per-process flag).
BUG=595089
Committed: https://crrev.com/b2ad050469118ea18e7c4c12112180d3fb8ab725
Cr-Commit-Position: refs/heads/master@{#390088}
Patch Set 1 #
Total comments: 1
Patch Set 2 : Move over a few more things, slightly reworked how Reset works. #Patch Set 3 : Rebasing... #Patch Set 4 : Rebasing... #
Total comments: 2
Patch Set 5 : Explicit constructor for TestRunnerForSpecificView. #
Messages
Total messages: 16 (6 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||