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 11 matching lines...) Expand all Loading... |
22 } | 22 } |
23 | 23 |
24 TestDevicePageBrowserProxy.prototype = { | 24 TestDevicePageBrowserProxy.prototype = { |
25 /** override */ | 25 /** override */ |
26 initializePointers: function() { | 26 initializePointers: function() { |
27 // Enable mouse and touchpad. | 27 // Enable mouse and touchpad. |
28 cr.webUIListenerCallback('has-mouse-changed', true); | 28 cr.webUIListenerCallback('has-mouse-changed', true); |
29 cr.webUIListenerCallback('has-touchpad-changed', true); | 29 cr.webUIListenerCallback('has-touchpad-changed', true); |
30 }, | 30 }, |
31 | 31 |
| 32 /** override */ |
| 33 initializeStylus: function() { |
| 34 // Enable stylus. |
| 35 cr.webUIListenerCallback('has-stylus-changed', true); |
| 36 }, |
| 37 |
32 /** @override */ | 38 /** @override */ |
33 handleLinkEvent: function(e) { | 39 handleLinkEvent: function(e) { |
34 settings.DevicePageBrowserProxyImpl.prototype.handleLinkEvent.call( | 40 settings.DevicePageBrowserProxyImpl.prototype.handleLinkEvent.call( |
35 this, e); | 41 this, e); |
36 // Prevent opening the link, which can block the test. | 42 // Prevent opening the link, which can block the test. |
37 e.preventDefault(); | 43 e.preventDefault(); |
38 }, | 44 }, |
39 | 45 |
40 /** override */ | 46 /** override */ |
41 initializeKeyboard: function() {}, | 47 initializeKeyboard: function() {}, |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 settings.DevicePageBrowserProxyImpl.getInstance().powerSourceId_); | 704 settings.DevicePageBrowserProxyImpl.getInstance().powerSourceId_); |
699 }); | 705 }); |
700 }); | 706 }); |
701 }); | 707 }); |
702 }); | 708 }); |
703 | 709 |
704 return { | 710 return { |
705 TestNames: TestNames | 711 TestNames: TestNames |
706 }; | 712 }; |
707 }); | 713 }); |
OLD | NEW |