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

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

Issue 1758973002: MD Settings: Creating a <settings-dialog> element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extra blank line Created 4 years, 9 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/test/data/webui/settings/reset_page_test.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_search_engines_page', function() { 5 cr.define('settings_search_engines_page', function() {
6 /** 6 /**
7 * A test version of SearchEnginesBrowserProxy. Provides helper methods 7 * A test version of SearchEnginesBrowserProxy. Provides helper methods
8 * for allowing tests to know when a method was called, as well as 8 * for allowing tests to know when a method was called, as well as
9 * specifying mock responses. 9 * specifying mock responses.
10 * 10 *
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 document.body.appendChild(dialog); 165 document.body.appendChild(dialog);
166 }); 166 });
167 167
168 teardown(function() { dialog.remove(); }); 168 teardown(function() { dialog.remove(); });
169 169
170 // Tests that the dialog calls 'searchEngineEditStarted' and 170 // Tests that the dialog calls 'searchEngineEditStarted' and
171 // 'searchEngineEditCancelled' when closed from the 'x' button. 171 // 'searchEngineEditCancelled' when closed from the 'x' button.
172 test('DialogOpenAndClose', function() { 172 test('DialogOpenAndClose', function() {
173 return browserProxy.whenCalled('searchEngineEditStarted').then( 173 return browserProxy.whenCalled('searchEngineEditStarted').then(
174 function() { 174 function() {
175 MockInteractions.tap(dialog.$.close); 175 MockInteractions.tap(dialog.$.dialog.getCloseButton());
176 return browserProxy.whenCalled('searchEngineEditCancelled'); 176 return browserProxy.whenCalled('searchEngineEditCancelled');
177 }); 177 });
178 }); 178 });
179 179
180 // Tests that the dialog calls 'searchEngineEditStarted' and 180 // Tests that the dialog calls 'searchEngineEditStarted' and
181 // 'searchEngineEditCancelled' when closed from the 'cancel' button. 181 // 'searchEngineEditCancelled' when closed from the 'cancel' button.
182 test('DialogOpenAndCancel', function() { 182 test('DialogOpenAndCancel', function() {
183 return browserProxy.whenCalled('searchEngineEditStarted').then( 183 return browserProxy.whenCalled('searchEngineEditStarted').then(
184 function() { 184 function() {
185 MockInteractions.tap(dialog.$.cancel); 185 MockInteractions.tap(dialog.$.cancel);
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 } 438 }
439 439
440 440
441 return { 441 return {
442 registerDialogTests: registerDialogTests, 442 registerDialogTests: registerDialogTests,
443 registerSearchEngineEntryTests: registerSearchEngineEntryTests, 443 registerSearchEngineEntryTests: registerSearchEngineEntryTests,
444 registerOmniboxExtensionEntryTests: registerOmniboxExtensionEntryTests, 444 registerOmniboxExtensionEntryTests: registerOmniboxExtensionEntryTests,
445 registerPageTests: registerPageTests, 445 registerPageTests: registerPageTests,
446 }; 446 };
447 }); 447 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/reset_page_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698