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

Unified Diff: chrome/test/data/webui/settings/languages_page_browsertest.js

Issue 2170583002: MD Settings: fix route query in tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/settings_page_browsertest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/languages_page_browsertest.js
diff --git a/chrome/test/data/webui/settings/languages_page_browsertest.js b/chrome/test/data/webui/settings/languages_page_browsertest.js
index a03eaa3d0f764dfb9e80bdb83e9098c5353cdd83..6568a0658b5153d273b20c32889330bd437a1677 100644
--- a/chrome/test/data/webui/settings/languages_page_browsertest.js
+++ b/chrome/test/data/webui/settings/languages_page_browsertest.js
@@ -67,11 +67,18 @@ TEST_F('SettingsLanguagesPageBrowserTest', 'MAYBE_LanguagesPage', function() {
}.bind(this));
teardown(function(done) {
- if (this.isAtRoot())
- return done();
- this.backToRoot();
- setTimeout(done);
- }.bind(this));
+ // Close the section if we're in a sub-page.
+ if (advanced.currentRoute.subpage.length == 0) {
+ done();
+ } else {
+ advanced.currentRoute = {
+ page: 'advanced',
+ section: '',
+ subpage: [],
+ };
+ setTimeout(done);
+ }
+ });
test('manage languages', function() {
var manageLanguagesButton =
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/settings_page_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698