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

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

Issue 2255023002: Settings: Remove /advanced usage as URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** @fileoverview Suite of tests for settings-bluetooth-page. */ 5 /** @fileoverview Suite of tests for settings-bluetooth-page. */
6 6
7 GEN_INCLUDE(['settings_page_browsertest.js']); 7 GEN_INCLUDE(['settings_page_browsertest.js']);
8 8
9 var bluetoothPage = bluetoothPage || {}; 9 var bluetoothPage = bluetoothPage || {};
10 10
11 /** 11 /**
12 * @constructor 12 * @constructor
13 * @extends {SettingsPageBrowserTest} 13 * @extends {SettingsPageBrowserTest}
14 */ 14 */
15 function SettingsBluetoothPageBrowserTest() { 15 function SettingsBluetoothPageBrowserTest() {
16 } 16 }
17 17
18 SettingsBluetoothPageBrowserTest.prototype = { 18 SettingsBluetoothPageBrowserTest.prototype = {
19 __proto__: SettingsPageBrowserTest.prototype, 19 __proto__: SettingsPageBrowserTest.prototype,
20 20
21 /** @override */ 21 /** @override */
22 browsePreload: 'chrome://md-settings/advanced',
23
24 /** @override */
25 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ 22 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([
26 '../fake_chrome_event.js', 23 '../fake_chrome_event.js',
27 'fake_bluetooth.js', 24 'fake_bluetooth.js',
28 'fake_bluetooth_private.js' 25 'fake_bluetooth_private.js'
29 ]), 26 ]),
30 27
31 /** @type {Bluetooth} */ 28 /** @type {Bluetooth} */
32 bluetoothApi_: undefined, 29 bluetoothApi_: undefined,
33 30
34 /** @type {BluetoothPrivate} */ 31 /** @type {BluetoothPrivate} */
(...skipping 20 matching lines...) Expand all
55 GEN('#else'); 52 GEN('#else');
56 GEN('#define MAYBE_Bluetooth Bluetooth'); 53 GEN('#define MAYBE_Bluetooth Bluetooth');
57 GEN('#endif'); 54 GEN('#endif');
58 55
59 // Runs bluetooth tests. 56 // Runs bluetooth tests.
60 TEST_F('SettingsBluetoothPageBrowserTest', 'MAYBE_Bluetooth', function() { 57 TEST_F('SettingsBluetoothPageBrowserTest', 'MAYBE_Bluetooth', function() {
61 // Differentiate |this| in the Test from |this| in suite() and test(), see 58 // Differentiate |this| in the Test from |this| in suite() and test(), see
62 // comment at the top of mocha_adapter.js. 59 // comment at the top of mocha_adapter.js.
63 var self = this; 60 var self = this;
64 61
62 self.toggleAdvanced();
65 var advanced = self.getPage('advanced'); 63 var advanced = self.getPage('advanced');
66 assertTrue(!!advanced); 64 assertTrue(!!advanced);
67 advanced.set('pageVisibility.bluetooth', true); 65 advanced.set('pageVisibility.bluetooth', true);
68 Polymer.dom.flush(); 66 Polymer.dom.flush();
69 67
70 /** @type {!Array<!chrome.bluetooth.Device>} */ var fakeDevices_ = [ 68 /** @type {!Array<!chrome.bluetooth.Device>} */ var fakeDevices_ = [
71 { 69 {
72 address: '10:00:00:00:00:01', 70 address: '10:00:00:00:00:01',
73 name: 'FakePairedDevice1', 71 name: 'FakePairedDevice1',
74 paired: true, 72 paired: true,
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 var response = self.bluetoothPrivateApi_.pairingResponses_[deviceAddress]; 187 var response = self.bluetoothPrivateApi_.pairingResponses_[deviceAddress];
190 assertTrue(!!response); 188 assertTrue(!!response);
191 expectEquals(chrome.bluetoothPrivate.PairingResponse.CANCEL, 189 expectEquals(chrome.bluetoothPrivate.PairingResponse.CANCEL,
192 response.response); 190 response.response);
193 }); 191 });
194 }); 192 });
195 193
196 // Run all registered tests. 194 // Run all registered tests.
197 mocha.run(); 195 mocha.run();
198 }); 196 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698