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

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

Issue 2378253003: MD Settings: Search page, switching paper-dropdown-menu to native select. (Closed)
Patch Set: Merge conflicts. Created 4 years, 3 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 | « chrome/browser/resources/settings/settings_resources.grd ('k') | 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/search_page_test.js
diff --git a/chrome/test/data/webui/settings/search_page_test.js b/chrome/test/data/webui/settings/search_page_test.js
index ac192e250a1d0c223c453905831dae43f87bd053..1e0b4a9917603c87c2964f4a369642256c500ad8 100644
--- a/chrome/test/data/webui/settings/search_page_test.js
+++ b/chrome/test/data/webui/settings/search_page_test.js
@@ -42,16 +42,18 @@ cr.define('settings_search_page', function() {
// Tests that the page is querying and displaying search engine info on
// startup.
test('Initialization', function() {
- var listboxElement = page.$$('paper-listbox');
+ var selectElement = page.$$('select');
return browserProxy.whenCalled('getSearchEnginesList').then(function() {
- assertEquals(0, listboxElement.selected);
+ Polymer.dom.flush();
+ assertEquals(0, selectElement.selectedIndex);
// Simulate a user initiated change of the default search engine.
- listboxElement.selected = 1;
+ selectElement.selectedIndex = 1;
+ selectElement.dispatchEvent(new CustomEvent('change'));
return browserProxy.whenCalled('setDefaultSearchEngine');
}).then(function() {
- assertEquals(1, listboxElement.selected);
+ assertEquals(1, selectElement.selectedIndex);
// Simulate a change that happened in a different tab.
var searchEnginesInfo = generateSearchEngineInfo();
@@ -61,7 +63,8 @@ cr.define('settings_search_page', function() {
browserProxy.resetResolver('setDefaultSearchEngine');
cr.webUIListenerCallback('search-engines-changed', searchEnginesInfo);
- assertEquals(2, listboxElement.selected);
+ Polymer.dom.flush();
+ assertEquals(2, selectElement.selectedIndex);
browserProxy.whenCalled('setDefaultSearchEngine').then(function() {
// Since the change happened in a different tab, there should be no
« no previous file with comments | « chrome/browser/resources/settings/settings_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698