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

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

Issue 2095993003: MD Settings: find language buttons more specifically in tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | no next file » | 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 f3222f8ecf7544defa2da36ac088ecc4e59f225e..307c4018420d02b79b044ef941307000118ce54d 100644
--- a/chrome/test/data/webui/settings/languages_page_browsertest.js
+++ b/chrome/test/data/webui/settings/languages_page_browsertest.js
@@ -21,8 +21,7 @@ var languageSettings = languageSettings || {};
* @constructor
* @extends {SettingsPageBrowserTest}
*/
-function SettingsLanguagesPageBrowserTest() {
-}
+function SettingsLanguagesPageBrowserTest() {}
SettingsLanguagesPageBrowserTest.prototype = {
__proto__: SettingsPageBrowserTest.prototype,
@@ -76,7 +75,8 @@ TEST_F('SettingsLanguagesPageBrowserTest', 'MAYBE_LanguagesPage', function() {
test('manage languages', function() {
var manageLanguagesButton =
- languagesPage.$.languagesCollapse.querySelector('.list-button');
+ languagesPage.$.languagesCollapse.querySelector(
+ '.list-button:last-of-type');
MockInteractions.tap(manageLanguagesButton);
assertTrue(!!languagesPage.$$('settings-manage-languages-page'));
});
@@ -87,8 +87,8 @@ TEST_F('SettingsLanguagesPageBrowserTest', 'MAYBE_LanguagesPage', function() {
assertTrue(!!languageButton);
MockInteractions.tap(languageButton);
- var languageDetailPage = languagesPage.$$(
- 'settings-language-detail-page');
+ var languageDetailPage =
+ languagesPage.$$('settings-language-detail-page');
assertTrue(!!languageDetailPage);
assertEquals('en-US', languageDetailPage.detail.language.code);
});
@@ -99,7 +99,7 @@ TEST_F('SettingsLanguagesPageBrowserTest', 'MAYBE_LanguagesPage', function() {
if (cr.isChromeOS) {
assertTrue(inputMethodSettingsExist);
var manageInputMethodsButton =
- inputMethodsCollapse.querySelector('.list-button');
+ inputMethodsCollapse.querySelector('.list-button:last-of-type');
MockInteractions.tap(manageInputMethodsButton);
assertTrue(!!languagesPage.$$('settings-manage-input-methods-page'));
} else {
@@ -114,7 +114,8 @@ TEST_F('SettingsLanguagesPageBrowserTest', 'MAYBE_LanguagesPage', function() {
assertFalse(spellCheckSettingsExist);
} else {
assertTrue(spellCheckSettingsExist);
- MockInteractions.tap(spellCheckCollapse.querySelector('.list-button'));
+ MockInteractions.tap(
+ spellCheckCollapse.querySelector('.list-button:last-of-type'));
assertTrue(!!languagesPage.$$('settings-edit-dictionary-page'));
}
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698