Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Issue 1908183002: Use correct WebView from TestRunner methods called via testRunner bindings. (Closed)

Created:
4 years, 8 months ago by Łukasz Anforowicz
Modified:
4 years, 7 months ago
CC:
chromium-reviews, jochen+watch_chromium.org, mlamouri+watch-test-runner_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@accessibility-controller-per-view
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+573 lines, -472 lines) Patch
M components/test_runner/test_interfaces.cc View 1 chunk +0 lines, -1 line 0 comments Download
M components/test_runner/test_runner.h View 1 2 3 4 15 chunks +212 lines, -164 lines 0 comments Download
M components/test_runner/test_runner.cc View 1 2 3 51 chunks +347 lines, -303 lines 0 comments Download
M components/test_runner/web_test_proxy.h View 1 2 3 3 chunks +6 lines, -0 lines 0 comments Download
M components/test_runner/web_test_proxy.cc View 1 2 chunks +4 lines, -1 line 0 comments Download
M components/test_runner/web_view_test_client.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M content/shell/renderer/layout_test/layout_test_content_renderer_client.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
Łukasz Anforowicz
jochen@ - this CL is not quite ready for a real review and land (I ...
4 years, 8 months ago (2016-04-21 23:41:01 UTC) #3
jochen (gone - plz use gerrit)
lgtm
4 years, 8 months ago (2016-04-22 15:25:14 UTC) #4
jochen (gone - plz use gerrit)
lgtm - as in, it's testing code. If it's green on the bots, you're good ...
4 years, 8 months ago (2016-04-22 15:25:59 UTC) #5
jochen (gone - plz use gerrit)
On 2016/04/21 at 23:41:01, lukasza wrote: > jochen@ - this CL is not quite ready ...
4 years, 8 months ago (2016-04-22 15:27:33 UTC) #6
Łukasz Anforowicz
jochen@, could you take another look please? I've moved a few more functions to TestRunnerForSpecificView ...
4 years, 8 months ago (2016-04-23 00:16:57 UTC) #8
jochen (gone - plz use gerrit)
still lgtm https://codereview.chromium.org/1908183002/diff/60001/components/test_runner/test_runner.h File components/test_runner/test_runner.h (right): https://codereview.chromium.org/1908183002/diff/60001/components/test_runner/test_runner.h#newcode648 components/test_runner/test_runner.h:648: TestRunnerForSpecificView(WebTestProxyBase* web_test_proxy_base); explicit
4 years, 7 months ago (2016-04-27 11:52:11 UTC) #9
Łukasz Anforowicz
https://codereview.chromium.org/1908183002/diff/60001/components/test_runner/test_runner.h File components/test_runner/test_runner.h (right): https://codereview.chromium.org/1908183002/diff/60001/components/test_runner/test_runner.h#newcode648 components/test_runner/test_runner.h:648: TestRunnerForSpecificView(WebTestProxyBase* web_test_proxy_base); On 2016/04/27 11:52:11, jochen wrote: > explicit ...
4 years, 7 months ago (2016-04-27 15:05:19 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1908183002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1908183002/80001
4 years, 7 months ago (2016-04-27 15:06:02 UTC) #13
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-04-27 15:51:54 UTC) #14
commit-bot: I haz the power
4 years, 7 months ago (2016-04-30 17:10:13 UTC) #15
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/b2ad050469118ea18e7c4c12112180d3fb8ab725
Cr-Commit-Position: refs/heads/master@{#390088}

Powered by Google App Engine
This is Rietveld 408576698