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

Side by Side Diff: chrome/test/data/webui/settings/startup_urls_page_test.js

Issue 2422993005: MD Settings: Migrate startup URL action menu to settings-action-menu. (Closed)
Patch Set: Nit. Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/settings/on_startup_page/startup_url_entry.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('settings_startup_urls_page', function() { 5 cr.define('settings_startup_urls_page', function() {
6 /** 6 /**
7 * @constructor 7 * @constructor
8 * @implements {settings.StartupUrlsPageBrowserProxy} 8 * @implements {settings.StartupUrlsPageBrowserProxy}
9 * @extends {settings.TestBrowserProxy} 9 * @extends {settings.TestBrowserProxy}
10 */ 10 */
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 setup(function() { 250 setup(function() {
251 browserProxy = new TestStartupUrlsPageBrowserProxy(); 251 browserProxy = new TestStartupUrlsPageBrowserProxy();
252 settings.StartupUrlsPageBrowserProxyImpl.instance_ = browserProxy; 252 settings.StartupUrlsPageBrowserProxyImpl.instance_ = browserProxy;
253 PolymerTest.clearBody(); 253 PolymerTest.clearBody();
254 element = document.createElement('settings-startup-url-entry'); 254 element = document.createElement('settings-startup-url-entry');
255 element.model = createSampleUrlEntry(); 255 element.model = createSampleUrlEntry();
256 document.body.appendChild(element); 256 document.body.appendChild(element);
257 257
258 // Bring up the popup menu for the following tests to use. 258 // Bring up the popup menu for the following tests to use.
259 assertFalse(!!element.$$('iron-dropdown')); 259 assertFalse(!!element.$$('dialog[is=settings-action-menu]'));
260 MockInteractions.tap(element.$.dots); 260 MockInteractions.tap(element.$.dots);
261 Polymer.dom.flush(); 261 Polymer.dom.flush();
262 assertTrue(!!element.$$('iron-dropdown')); 262 assertTrue(!!element.$$('dialog[is=settings-action-menu]'));
263 }); 263 });
264 264
265 teardown(function() { element.remove(); }); 265 teardown(function() { element.remove(); });
266 266
267 test('MenuOptions_Remove', function() { 267 test('MenuOptions_Remove', function() {
268 var removeButton = element.shadowRoot.querySelector('#remove') 268 var removeButton = element.shadowRoot.querySelector('#remove')
269 MockInteractions.tap(removeButton); 269 MockInteractions.tap(removeButton);
270 return browserProxy.whenCalled('removeStartupPage').then( 270 return browserProxy.whenCalled('removeStartupPage').then(
271 function(modelIndex) { 271 function(modelIndex) {
272 assertEquals(element.model.modelIndex, modelIndex); 272 assertEquals(element.model.modelIndex, modelIndex);
273 }); 273 });
274 }); 274 });
275 }); 275 });
276 }); 276 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/on_startup_page/startup_url_entry.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698