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

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

Issue 2629573006: chromeos: Add Power device page to chrome://md-settings. (Closed)
Patch Set: merge 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/settings/device_page_tests.js
diff --git a/chrome/test/data/webui/settings/device_page_tests.js b/chrome/test/data/webui/settings/device_page_tests.js
index 4254c2015d95c5ee3ad2a3e4b04b629b2fb89654..9725b23fb94950d82779bd2759b8803ce64f744b 100644
--- a/chrome/test/data/webui/settings/device_page_tests.js
+++ b/chrome/test/data/webui/settings/device_page_tests.js
@@ -588,7 +588,8 @@ cr.define('device_page_tests', function() {
});
suite('power settings', function() {
- var powerRow;
+ var powerPage;
+ var powerSourceRow;
var powerSourceWrapper;
var powerSourceSelect;
@@ -600,13 +601,18 @@ cr.define('device_page_tests', function() {
});
setup(function() {
- powerRow = assert(devicePage.$$('#powerRow'));
- powerSourceWrapper =
- assert(powerRow.querySelector('.md-select-wrapper'));
- powerSourceSelect = assert(devicePage.$$('#powerSource'));
- assertEquals(1,
- settings.DevicePageBrowserProxyImpl.getInstance()
- .updatePowerStatusCalled_);
+ return showAndGetDeviceSubpage('power', settings.Route.POWER)
+ .then(function(page) {
+ powerPage = page;
+ powerSourceRow = assert(powerPage.$$('#powerSourceRow'));
+ powerSourceWrapper =
+ assert(powerSourceRow.querySelector('.md-select-wrapper'));
+ powerSourceSelect = assert(powerPage.$$('#powerSource'));
+ assertEquals(
+ 1,
+ settings.DevicePageBrowserProxyImpl.getInstance()
+ .updatePowerStatusCalled_);
+ });
});
test('power sources', function() {

Powered by Google App Engine
This is Rietveld 408576698