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

Issue 1886013002: Track focused view in TestRunner instead of in BlinkTestRunner. (Closed)

Created:
4 years, 8 months ago by Łukasz Anforowicz
Modified:
4 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, Peter Beverloo, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Track focused view in TestRunner instead of in BlinkTestRunner. Problem description =================== Layout tests attempt to "globally" track currently focused view - this is done in order to "defocus" previously focused view at the right time. Before this CL, the tracking was done in an instance field of a BlinkTestRunner - this is wrong, as BlinkTestRunner is not "global" (there can be multiple BlinkTestRunner objects associated with a single TestInterfaces / TestRunner pair, because BlinkTestRunner objects are created for each view). The wrongness described above was leading to test failures in https://crrev.com/1885993002 which starts to use correct BlinkTestRunner from WebViewTestClient and WebTestProxyBase. The test failures were in: - scrollbars/custom-scrollbar-inactive-pseudo.html - http/tests/notifications/click-window-focus-document.html Fix description =============== This CL moves tracking of the previously focused view from BlinkTestRunner::focused_view_ into TestRunner::previously_focused_view_. BlinkTestRunner::OnSetTestConfiguration has to go through WebTestRunner/TestRunner to correctly track view focused when starting a test. Alternative fix would be to make BlinkTestRunner::focused_view_ field static. This works (as seen in patchset 1 at https://crrev.com/1885993002/#ps1), but the fix in the current CL more correctly assigns responsibilities: - TestRunner tracks global test state - BlinkTestRunner tracks test state associated with a specific view / window (i.e. whether it is a |is_main_window_|). OTOH, I recognize that unfortunately BlinkTestRunner is currently still responsible for other globally-applicable functionality (i.e. PrintMessage). BUG=595089 Committed: https://crrev.com/95416be1445ef1c72a8f907b36c48d8c209c8442 Cr-Commit-Position: refs/heads/master@{#387316}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -29 lines) Patch
M components/test_runner/test_runner.h View 3 chunks +7 lines, -1 line 0 comments Download
M components/test_runner/test_runner.cc View 2 chunks +17 lines, -1 line 0 comments Download
M components/test_runner/web_test_runner.h View 1 chunk +4 lines, -0 lines 0 comments Download
M components/test_runner/web_view_test_client.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/shell/renderer/layout_test/blink_test_runner.h View 1 chunk +0 lines, -2 lines 0 comments Download
M content/shell/renderer/layout_test/blink_test_runner.cc View 3 chunks +6 lines, -24 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 12 (5 generated)
Łukasz Anforowicz
jochen@, could you please take a look?
4 years, 8 months ago (2016-04-13 21:24:02 UTC) #2
jochen (gone - plz use gerrit)
lgtm
4 years, 8 months ago (2016-04-14 13:31:09 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1886013002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1886013002/1
4 years, 8 months ago (2016-04-14 13:50:33 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-14 14:23:28 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1886013002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1886013002/1
4 years, 8 months ago (2016-04-14 15:01:00 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-04-14 15:06:45 UTC) #10
commit-bot: I haz the power
4 years, 8 months ago (2016-04-14 15:07:38 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/95416be1445ef1c72a8f907b36c48d8c209c8442
Cr-Commit-Position: refs/heads/master@{#387316}

Powered by Google App Engine
This is Rietveld 408576698