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

Unified Diff: chrome/test/data/webui/settings/bluetooth_page_browsertest_chromeos.js

Issue 2256773005: MD Settings: Bluetooth: Use CrScrollableBehavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_638377_scrollable_behavior
Patch Set: Improve item focus and fix tests 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/settings/bluetooth_page/compiled_resources2.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/bluetooth_page_browsertest_chromeos.js
diff --git a/chrome/test/data/webui/settings/bluetooth_page_browsertest_chromeos.js b/chrome/test/data/webui/settings/bluetooth_page_browsertest_chromeos.js
index 134256e67584116f18abcd7a6846f5454479a4b0..887961b5dd98bbdc6a618fff112d45ab1c72e3f9 100644
--- a/chrome/test/data/webui/settings/bluetooth_page_browsertest_chromeos.js
+++ b/chrome/test/data/webui/settings/bluetooth_page_browsertest_chromeos.js
@@ -137,6 +137,11 @@ TEST_F('SettingsBluetoothPageBrowserTest', 'MAYBE_Bluetooth', function() {
// should be hidden.
self.bluetoothApi_.setDevicesForTest(fakeDevices_);
Polymer.dom.flush();
+ assertEquals(bluetooth.deviceList.length, 4);
+ var devicesIronList = bluetooth.$$('#deviceList iron-list');
+ assertTrue(!!devicesIronList);
+ devicesIronList.notifyResize();
+ Polymer.dom.flush();
expectTrue(noDevices.hidden);
// Confirm that there are two paired devices in the list.
var devices = deviceList.querySelectorAll('bluetooth-device-list-item');
@@ -158,36 +163,33 @@ TEST_F('SettingsBluetoothPageBrowserTest', 'MAYBE_Bluetooth', function() {
MockInteractions.tap(bluetooth.$$('.primary-button'));
Polymer.dom.flush();
// Ensure the dialog appears.
- var dialog = bluetooth.$.deviceDialog;
+ var dialog = bluetooth.$$('#deviceDialog');
assertTrue(!!dialog);
assertTrue(dialog.$.dialog.open);
+ assertEquals(dialog.deviceList.length, 4);
// Ensure the dialog has the expected devices.
- var devicesDiv = dialog.$$('#dialogDeviceList');
- assertTrue(!!devicesDiv);
- var devices = devicesDiv.querySelectorAll('bluetooth-device-list-item');
- assertEquals(2, devices.length);
+ var devicesIronList = dialog.$$('#dialogDeviceList iron-list');
+ assertTrue(!!devicesIronList);
+ devicesIronList.notifyResize();
+ Polymer.dom.flush();
+ var devices =
+ devicesIronList.querySelectorAll('bluetooth-device-list-item');
+ assertEquals(devices.length, 2);
// Select a device.
MockInteractions.tap(devices[0].$$('div'));
Polymer.dom.flush();
// Ensure the pairing dialog is shown.
assertTrue(!!dialog.$$('#pairing'));
- // Ensure the device is connected to.
+
+ // Ensure the device wass connected to.
expectEquals(1, self.bluetoothPrivateApi_.connectedDevices_.size);
- var deviceAddress =
- self.bluetoothPrivateApi_.connectedDevices_.keys().next().value;
// Close the dialog.
- var close = dialog.$.dialog.getCloseButton();
- assertTrue(!!close);
- MockInteractions.tap(close);
+ dialog.close();
Polymer.dom.flush();
- expectFalse(dialog.$.dialog.open);
- var response = self.bluetoothPrivateApi_.pairingResponses_[deviceAddress];
- assertTrue(!!response);
- expectEquals(chrome.bluetoothPrivate.PairingResponse.CANCEL,
- response.response);
+ assertFalse(dialog.$.dialog.open);
});
});
« no previous file with comments | « chrome/browser/resources/settings/bluetooth_page/compiled_resources2.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698