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

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

Issue 2927653002: WebUI: Move test_browser_proxy.js one level up. (Closed)
Patch Set: Remove namespace Created 3 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 unified diff | Download patch
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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {settings.ImportDataBrowserProxy} 7 * @implements {settings.ImportDataBrowserProxy}
8 * @extends {settings.TestBrowserProxy} 8 * @extends {TestBrowserProxy}
9 */ 9 */
10 var TestImportDataBrowserProxy = function() { 10 var TestImportDataBrowserProxy = function() {
11 settings.TestBrowserProxy.call(this, [ 11 TestBrowserProxy.call(this, [
12 'initializeImportDialog', 12 'initializeImportDialog',
13 'importFromBookmarksFile', 13 'importFromBookmarksFile',
14 'importData', 14 'importData',
15 ]); 15 ]);
16 16
17 /** @private {!Array<!settings.BrowserProfile} */ 17 /** @private {!Array<!settings.BrowserProfile} */
18 this.browserProfiles_ = []; 18 this.browserProfiles_ = [];
19 }; 19 };
20 20
21 TestImportDataBrowserProxy.prototype = { 21 TestImportDataBrowserProxy.prototype = {
22 __proto__: settings.TestBrowserProxy.prototype, 22 __proto__: TestBrowserProxy.prototype,
23 23
24 /** @param {!Array<!settings.BrowserProfile} browserProfiles */ 24 /** @param {!Array<!settings.BrowserProfile} browserProfiles */
25 setBrowserProfiles: function(browserProfiles) { 25 setBrowserProfiles: function(browserProfiles) {
26 this.browserProfiles_ = browserProfiles; 26 this.browserProfiles_ = browserProfiles;
27 }, 27 },
28 28
29 /** @override */ 29 /** @override */
30 initializeImportDialog: function() { 30 initializeImportDialog: function() {
31 this.methodCalled('initializeImportDialog'); 31 this.methodCalled('initializeImportDialog');
32 return Promise.resolve(this.browserProfiles_.slice()); 32 return Promise.resolve(this.browserProfiles_.slice());
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 assertFalse(dialog.$.successIcon.parentElement.hidden); 189 assertFalse(dialog.$.successIcon.parentElement.hidden);
190 assertTrue(dialog.$$('settings-toggle-button').parentElement.hidden); 190 assertTrue(dialog.$$('settings-toggle-button').parentElement.hidden);
191 }); 191 });
192 }); 192 });
193 193
194 test('ImportError', function() { 194 test('ImportError', function() {
195 simulateImportStatusChange(settings.ImportDataStatus.FAILED); 195 simulateImportStatusChange(settings.ImportDataStatus.FAILED);
196 assertFalse(dialog.$.dialog.open); 196 assertFalse(dialog.$.dialog.open);
197 }); 197 });
198 }); 198 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698