| OLD | NEW |
| 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 cr.define('device_page_tests', function() { | 5 cr.define('device_page_tests', function() { |
| 6 /** @enum {string} */ | 6 /** @enum {string} */ |
| 7 var TestNames = { | 7 var TestNames = { |
| 8 DevicePage: 'device page', | 8 DevicePage: 'device page', |
| 9 Display: 'display', | 9 Display: 'display', |
| 10 Keyboard: 'keyboard', | 10 Keyboard: 'keyboard', |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 suiteSetup(function() { | 152 suiteSetup(function() { |
| 153 // Disable animations so sub-pages open within one event loop. | 153 // Disable animations so sub-pages open within one event loop. |
| 154 testing.Test.disableAnimationsAndTransitions(); | 154 testing.Test.disableAnimationsAndTransitions(); |
| 155 }); | 155 }); |
| 156 | 156 |
| 157 setup(function(done) { | 157 setup(function(done) { |
| 158 fakeSystemDisplay = new settings.FakeSystemDisplay(); | 158 fakeSystemDisplay = new settings.FakeSystemDisplay(); |
| 159 settings.display.systemDisplayApi = fakeSystemDisplay; | 159 settings.display.systemDisplayApi = fakeSystemDisplay; |
| 160 | 160 |
| 161 PolymerTest.clearBody(); | 161 PolymerTest.clearBody(); |
| 162 settings.navigateTo(settings.Route.BASIC); |
| 163 |
| 162 devicePage = document.createElement('settings-device-page'); | 164 devicePage = document.createElement('settings-device-page'); |
| 163 devicePage.prefs = getFakePrefs(); | 165 devicePage.prefs = getFakePrefs(); |
| 164 settings.DevicePageBrowserProxyImpl.instance_ = | 166 settings.DevicePageBrowserProxyImpl.instance_ = |
| 165 new TestDevicePageBrowserProxy(); | 167 new TestDevicePageBrowserProxy(); |
| 166 | 168 |
| 167 // settings-animated-pages expects a parent with data-page set. | 169 // settings-animated-pages expects a parent with data-page set. |
| 168 var basicPage = document.createElement('div'); | 170 var basicPage = document.createElement('div'); |
| 169 basicPage.dataset.page = 'basic'; | 171 basicPage.dataset.page = 'basic'; |
| 170 basicPage.appendChild(devicePage); | 172 basicPage.appendChild(devicePage); |
| 171 document.body.appendChild(basicPage); | 173 document.body.appendChild(basicPage); |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 expectTrue(displayPage.showMirror_(displayPage.displays)); | 524 expectTrue(displayPage.showMirror_(displayPage.displays)); |
| 523 expectTrue(displayPage.isMirrored_(displayPage.displays)); | 525 expectTrue(displayPage.isMirrored_(displayPage.displays)); |
| 524 }); | 526 }); |
| 525 }); | 527 }); |
| 526 }); | 528 }); |
| 527 | 529 |
| 528 return { | 530 return { |
| 529 TestNames: TestNames | 531 TestNames: TestNames |
| 530 }; | 532 }; |
| 531 }); | 533 }); |
| OLD | NEW |