OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 chrome.test.runWithModuleSystem(function(moduleSystem) { | 5 chrome.test.runWithModuleSystem(function(moduleSystem) { |
6 window.AutomationRootNode = | 6 window.AutomationRootNode = |
7 moduleSystem.require('automationNode').AutomationRootNode; | 7 moduleSystem.require('automationNode').AutomationRootNode; |
8 window.privates = moduleSystem.privates; | 8 window.privates = moduleSystem.privates; |
| 9 // Unused. |
| 10 window.automationUtil = function() {}; |
| 11 window.automationUtil.storeTreeCallback = function() {}; |
9 }); | 12 }); |
10 | 13 |
11 var assertEq = chrome.test.assertEq; | 14 var assertEq = chrome.test.assertEq; |
12 var assertFalse = chrome.test.assertFalse; | 15 var assertFalse = chrome.test.assertFalse; |
13 var assertTrue = chrome.test.assertTrue; | 16 var assertTrue = chrome.test.assertTrue; |
14 var assertIsDef = function(obj) { | 17 var assertIsDef = function(obj) { |
15 assertTrue(obj !== null && obj !== undefined); | 18 assertTrue(obj !== null && obj !== undefined); |
16 } | 19 } |
17 var assertIsNotDef = function(obj) { | 20 var assertIsNotDef = function(obj) { |
18 assertTrue(obj === null || obj === undefined); | 21 assertTrue(obj === null || obj === undefined); |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 216 |
214 // Make sure the name changes. | 217 // Make sure the name changes. |
215 assertTrue(privates(tree).impl.unserialize(update)); | 218 assertTrue(privates(tree).impl.unserialize(update)); |
216 assertEq('bar', button.attributes.name); | 219 assertEq('bar', button.attributes.name); |
217 | 220 |
218 succeed(); | 221 succeed(); |
219 } | 222 } |
220 ]; | 223 ]; |
221 | 224 |
222 chrome.test.runTests(tests); | 225 chrome.test.runTests(tests); |
OLD | NEW |