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

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

Issue 2670833007: MD Settings: Fix bluetooth_page_tests.js in Vulcanized mode. (Closed)
Patch Set: Created 3 years, 10 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 suite('Bluetooth', function() { 5 suite('Bluetooth', function() {
6 var bluetoothPage = null; 6 var bluetoothPage = null;
7 7
8 /** @type {Bluetooth} */ 8 /** @type {Bluetooth} */
9 var bluetoothApi_; 9 var bluetoothApi_;
10 10
(...skipping 20 matching lines...) Expand all
31 paired: false, 31 paired: false,
32 }, 32 },
33 { 33 {
34 address: '00:00:00:00:00:02', 34 address: '00:00:00:00:00:02',
35 name: 'FakeUnPairedDevice2', 35 name: 'FakeUnPairedDevice2',
36 paired: false, 36 paired: false,
37 }, 37 },
38 ]; 38 ];
39 39
40 suiteSetup(function() { 40 suiteSetup(function() {
41 window.loadTimeData = new LoadTimeData; 41 loadTimeData.overrideValues({
42 loadTimeData.data = {
43 bluetoothEnabled: 'bluetoothEnabled', 42 bluetoothEnabled: 'bluetoothEnabled',
44 bluetoothDisabled: 'bluetoothDisabled', 43 bluetoothDisabled: 'bluetoothDisabled',
45 bluetoothOn: 'bluetoothOn', 44 bluetoothOn: 'bluetoothOn',
46 bluetoothOff: 'bluetoothOff', 45 bluetoothOff: 'bluetoothOff',
47 bluetoothConnected: 'bluetoothConnected', 46 bluetoothConnected: 'bluetoothConnected',
48 bluetoothDisconnect: 'bluetoothDisconnect', 47 bluetoothDisconnect: 'bluetoothDisconnect',
49 bluetoothPair: 'bluetoothPair', 48 bluetoothPair: 'bluetoothPair',
50 bluetoothStartConnecting: 'bluetoothStartConnecting', 49 bluetoothStartConnecting: 'bluetoothStartConnecting',
51 50 });
52 };
53 51
54 bluetoothApi_ = new settings.FakeBluetooth(); 52 bluetoothApi_ = new settings.FakeBluetooth();
55 bluetoothPrivateApi_ = new settings.FakeBluetoothPrivate(bluetoothApi_); 53 bluetoothPrivateApi_ = new settings.FakeBluetoothPrivate(bluetoothApi_);
56 54
57 // Set globals to override Settings Bluetooth Page apis. 55 // Set globals to override Settings Bluetooth Page apis.
58 bluetoothApis.bluetoothApiForTest = bluetoothApi_; 56 bluetoothApis.bluetoothApiForTest = bluetoothApi_;
59 bluetoothApis.bluetoothPrivateApiForTest = bluetoothPrivateApi_; 57 bluetoothApis.bluetoothPrivateApiForTest = bluetoothPrivateApi_;
60 58
61 // Disable animations so sub-pages open within one event loop. 59 // Disable animations so sub-pages open within one event loop.
62 testing.Test.disableAnimationsAndTransitions(); 60 testing.Test.disableAnimationsAndTransitions();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Ensure the device wass connected to. 159 // Ensure the device wass connected to.
162 expectEquals(1, bluetoothPrivateApi_.connectedDevices_.size); 160 expectEquals(1, bluetoothPrivateApi_.connectedDevices_.size);
163 161
164 // Close the dialog. 162 // Close the dialog.
165 dialog.close(); 163 dialog.close();
166 Polymer.dom.flush(); 164 Polymer.dom.flush();
167 assertFalse(dialog.$.dialog.open); 165 assertFalse(dialog.$.dialog.open);
168 }); 166 });
169 }); 167 });
170 }); 168 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698