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

Issue 2837703002: Change SettingsLanguagesPageBrowserTest to CrSettingsLanguagesPageTest (Closed)

Created:
3 years, 8 months ago by michaelpg
Modified:
3 years, 7 months ago
Reviewers:
dpapad
CC:
arv+watch_chromium.org, chromium-reviews, dbeam+watch-elements_chromium.org, dbeam+watch-settings_chromium.org, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, michaelpg+watch-elements_chromium.org, oshima+watch_chromium.org, stevenjb+watch-md-settings_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Change SettingsLanguagesPageBrowserTest to CrSettingsLanguagesPageTest Transforms a browser test to a lighterweight browser test in an attempt to avoid test flakes: don't load the settings page (in non-vulcanized builds), don't make round trips to the real browser settings, and split up the tests into four individual browser tests. SettingsLanguagesPageBrowserTest is currently a SettingsPageBrowserTest test fixture that loads chrome://md-settings with real browser settings to test language settings. This CL changes it into a CrSettingsBrowserTest, which differs by loading only the <settings-languages-page> file and its dependencies, starting with a blank page, mocking the various settings APIs, and testing the element in isolation. On a vulcanized build, we still load the entire chrome://md-settings page. Once it loads, though, we clear that page, mock the various settings APIs, and can still test a <settings-languages-page> in relative isolation. The mocha test suite is invoked in four parts, so each browser test has to execute fewer mocha tests and should finish in less time. R=dpapad@chromium.org BUG=641400 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2837703002 Cr-Commit-Position: refs/heads/master@{#469789} Committed: https://chromium.googlesource.com/chromium/src/+/dbea67d82a6fc4caa4558ae3066bfa76afdc18e1

Patch Set 1 #

Patch Set 2 : cleanup #

Total comments: 6

Patch Set 3 : rebase #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+353 lines, -812 lines) Patch
M chrome/browser/resources/settings/languages_page/languages_page.html View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/data/webui/BUILD.gn View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/test/data/webui/settings/cr_settings_browsertest.js View 1 2 3 2 chunks +43 lines, -0 lines 0 comments Download
M chrome/test/data/webui/settings/fake_language_settings_private.js View 1 chunk +52 lines, -1 line 0 comments Download
D chrome/test/data/webui/settings/languages_page_browsertest.js View 3 1 chunk +0 lines, -461 lines 0 comments Download
A + chrome/test/data/webui/settings/languages_page_tests.js View 1 3 12 chunks +179 lines, -245 lines 0 comments Download
M chrome/test/data/webui/settings/languages_tests.js View 3 chunks +4 lines, -104 lines 0 comments Download
A chrome/test/data/webui/settings/test_languages_browser_proxy.js View 1 chunk +51 lines, -0 lines 0 comments Download
M chrome/test/data/webui/settings/test_util.js View 1 chunk +21 lines, -0 lines 0 comments Download
M ui/webui/resources/cr_elements/shared_vars_css.html View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 18 (11 generated)
dpapad
LGTM with nits. Thanks for doing this! https://codereview.chromium.org/2837703002/diff/20001/chrome/test/data/webui/settings/languages_page_tests.js File chrome/test/data/webui/settings/languages_page_tests.js (right): https://codereview.chromium.org/2837703002/diff/20001/chrome/test/data/webui/settings/languages_page_tests.js#newcode7 chrome/test/data/webui/settings/languages_page_tests.js:7: const TestNames ...
3 years, 8 months ago (2017-04-25 20:41:17 UTC) #6
michaelpg
Waiting to see whether the PolymerTest.clearBody CL this depends on passes tests. https://codereview.chromium.org/2837703002/diff/20001/chrome/test/data/webui/settings/languages_page_tests.js File chrome/test/data/webui/settings/languages_page_tests.js ...
3 years, 7 months ago (2017-05-04 22:54:20 UTC) #7
dpapad
LGTM++
3 years, 7 months ago (2017-05-05 17:12:09 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2837703002/40001
3 years, 7 months ago (2017-05-05 18:52:40 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/261883) cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, ...
3 years, 7 months ago (2017-05-05 18:57:29 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2837703002/60001
3 years, 7 months ago (2017-05-05 21:05:17 UTC) #15
commit-bot: I haz the power
3 years, 7 months ago (2017-05-05 22:55:34 UTC) #18
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/dbea67d82a6fc4caa4558ae3066b...

Powered by Google App Engine
This is Rietveld 408576698