| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 assertLT(0, pointersPage.$.mouse.offsetHeight); | 267 assertLT(0, pointersPage.$.mouse.offsetHeight); |
| 268 assertLT(0, pointersPage.$.touchpad.offsetHeight); | 268 assertLT(0, pointersPage.$.touchpad.offsetHeight); |
| 269 assertLT(0, pointersPage.$$('#mouse h2').offsetHeight); | 269 assertLT(0, pointersPage.$$('#mouse h2').offsetHeight); |
| 270 assertLT(0, pointersPage.$$('#touchpad h2').offsetHeight); | 270 assertLT(0, pointersPage.$$('#touchpad h2').offsetHeight); |
| 271 }); | 271 }); |
| 272 }); | 272 }); |
| 273 | 273 |
| 274 test('mouse', function() { | 274 test('mouse', function() { |
| 275 expectLT(0, pointersPage.$.mouse.offsetHeight); | 275 expectLT(0, pointersPage.$.mouse.offsetHeight); |
| 276 | 276 |
| 277 expectFalse(pointersPage.$$('#mouse settings-checkbox').checked); | 277 expectFalse(pointersPage.$$('#mouse settings-toggle-button').checked); |
| 278 | 278 |
| 279 var slider = assert(pointersPage.$$('#mouse cr-slider')); | 279 var slider = assert(pointersPage.$$('#mouse cr-slider')); |
| 280 expectEquals(4, slider.value); | 280 expectEquals(4, slider.value); |
| 281 MockInteractions.pressAndReleaseKeyOn(slider.$.slider, 37 /* left */); | 281 MockInteractions.pressAndReleaseKeyOn(slider.$.slider, 37 /* left */); |
| 282 expectEquals(3, devicePage.prefs.settings.mouse.sensitivity2.value); | 282 expectEquals(3, devicePage.prefs.settings.mouse.sensitivity2.value); |
| 283 | 283 |
| 284 pointersPage.set('prefs.settings.mouse.sensitivity2.value', 5); | 284 pointersPage.set('prefs.settings.mouse.sensitivity2.value', 5); |
| 285 expectEquals(5, slider.value); | 285 expectEquals(5, slider.value); |
| 286 }); | 286 }); |
| 287 | 287 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 expectTrue(displayPage.showMirror_(displayPage.displays)); | 524 expectTrue(displayPage.showMirror_(displayPage.displays)); |
| 525 expectTrue(displayPage.isMirrored_(displayPage.displays)); | 525 expectTrue(displayPage.isMirrored_(displayPage.displays)); |
| 526 }); | 526 }); |
| 527 }); | 527 }); |
| 528 }); | 528 }); |
| 529 | 529 |
| 530 return { | 530 return { |
| 531 TestNames: TestNames | 531 TestNames: TestNames |
| 532 }; | 532 }; |
| 533 }); | 533 }); |
| OLD | NEW |