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

Side by Side Diff: chrome/browser/resources/chromeos/switch_access/switch_access_unittest.gtestjs

Issue 2760453002: Creating options page and storing preferences. (Closed)
Patch Set: Responded to comments Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 /** 5 /**
6 * Test fixture for switch_access.js. 6 * Test fixture for switch_access.js.
7 * @constructor 7 * @constructor
8 * @extends {testing.Test} 8 * @extends {testing.Test}
9 */ 9 */
10 function SwitchAccessUnitTest () { 10 function SwitchAccessUnitTest () {
11 testing.Test.call(this); 11 testing.Test.call(this);
12 }; 12 };
13 13
14 SwitchAccessUnitTest.prototype = { 14 SwitchAccessUnitTest.prototype = {
15 __proto__: testing.Test.prototype, 15 __proto__: testing.Test.prototype,
16 16
17 /** @override */ 17 /** @override */
18 extraLibraries: [ 18 extraLibraries: [
19 'test_support.js', 19 'test_support.js',
20 'prefs.js',
20 'switch_access.js', 21 'switch_access.js',
21 'testable_switch_access.js', 22 'testable_switch_access.js',
22 ], 23 ],
23 24
24 getSampleTree: function() { 25 getSampleTree: function() {
25 // root 26 // root
26 // middle1 27 // middle1
27 // leaf1 28 // leaf1
28 // leaf2 29 // leaf2
29 // leaf3 30 // leaf3
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 let node2 = {state: {}}; 127 let node2 = {state: {}};
127 let node3 = {state: {focusable: false}}; 128 let node3 = {state: {focusable: false}};
128 let node4 = {state: {focusable: true}}; 129 let node4 = {state: {focusable: true}};
129 let tsa = new TestableSwitchAccess(); 130 let tsa = new TestableSwitchAccess();
130 131
131 assertTrue(tsa.isInteresting(node1) === undefined); 132 assertTrue(tsa.isInteresting(node1) === undefined);
132 assertTrue(tsa.isInteresting(node2) === undefined); 133 assertTrue(tsa.isInteresting(node2) === undefined);
133 assertFalse(tsa.isInteresting(node3)); 134 assertFalse(tsa.isInteresting(node3));
134 assertTrue(tsa.isInteresting(node4)); 135 assertTrue(tsa.isInteresting(node4));
135 }); 136 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698