| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 var pointersPage; | 220 var pointersPage; |
| 221 | 221 |
| 222 setup(function() { | 222 setup(function() { |
| 223 return showAndGetDeviceSubpage('pointers').then(function(page) { | 223 return showAndGetDeviceSubpage('pointers').then(function(page) { |
| 224 pointersPage = page; | 224 pointersPage = page; |
| 225 }); | 225 }); |
| 226 }); | 226 }); |
| 227 | 227 |
| 228 test('subpage responds to pointer attach/detach', function() { | 228 test('subpage responds to pointer attach/detach', function() { |
| 229 assertEquals('pointers', devicePage.currentRoute.subpage[0]); | 229 assertEquals('pointers', devicePage.currentRoute.subpage[0]); |
| 230 assertTrue(devicePage.isCurrentRouteOnPointersPage_()); | 230 assertTrue(devicePage.currentRoute == settings.Route.POINTERS); |
| 231 assertLT(0, pointersPage.$.mouse.offsetHeight); | 231 assertLT(0, pointersPage.$.mouse.offsetHeight); |
| 232 assertLT(0, pointersPage.$.touchpad.offsetHeight); | 232 assertLT(0, pointersPage.$.touchpad.offsetHeight); |
| 233 assertLT(0, pointersPage.$$('#mouse h2').offsetHeight); | 233 assertLT(0, pointersPage.$$('#mouse h2').offsetHeight); |
| 234 assertLT(0, pointersPage.$$('#touchpad h2').offsetHeight); | 234 assertLT(0, pointersPage.$$('#touchpad h2').offsetHeight); |
| 235 | 235 |
| 236 cr.webUIListenerCallback('has-touchpad-changed', false); | 236 cr.webUIListenerCallback('has-touchpad-changed', false); |
| 237 assertEquals('pointers', devicePage.currentRoute.subpage[0]); | 237 assertEquals('pointers', devicePage.currentRoute.subpage[0]); |
| 238 assertLT(0, pointersPage.$.mouse.offsetHeight); | 238 assertLT(0, pointersPage.$.mouse.offsetHeight); |
| 239 assertEquals(0, pointersPage.$.touchpad.offsetHeight); | 239 assertEquals(0, pointersPage.$.touchpad.offsetHeight); |
| 240 assertEquals(0, pointersPage.$$('#mouse h2').offsetHeight); | 240 assertEquals(0, pointersPage.$$('#mouse h2').offsetHeight); |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 expectTrue(displayPage.showMirror_(displayPage.displays)); | 519 expectTrue(displayPage.showMirror_(displayPage.displays)); |
| 520 expectTrue(displayPage.isMirrored_(displayPage.displays)); | 520 expectTrue(displayPage.isMirrored_(displayPage.displays)); |
| 521 }); | 521 }); |
| 522 }); | 522 }); |
| 523 }); | 523 }); |
| 524 | 524 |
| 525 return { | 525 return { |
| 526 TestNames: TestNames | 526 TestNames: TestNames |
| 527 }; | 527 }; |
| 528 }); | 528 }); |
| OLD | NEW |