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. | 9 // Unused. |
10 window.automationUtil = function() {}; | 10 window.automationUtil = function() {}; |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 'intAttributes': { 'scrollY': 583, | 291 'intAttributes': { 'scrollY': 583, |
292 'scrollYMax': 9336 }, | 292 'scrollYMax': 9336 }, |
293 'childIds': [2, 3] | 293 'childIds': [2, 3] |
294 }, | 294 }, |
295 { | 295 { |
296 'id': 2, 'role': 'textField', | 296 'id': 2, 'role': 'textField', |
297 'intAttributes': { 'textSelStart': 10, 'textSelEnd': 20 }, | 297 'intAttributes': { 'textSelStart': 10, 'textSelEnd': 20 }, |
298 'childIds': [] | 298 'childIds': [] |
299 }, | 299 }, |
300 { | 300 { |
301 'id': 3, 'role': 'textArea', | 301 'id': 3, 'role': 'textField', |
302 'childIds': [] | 302 'childIds': [] |
303 }, | 303 }, |
304 | 304 |
305 ] }; | 305 ] }; |
306 | 306 |
307 var tree = new AutomationRootNode(); | 307 var tree = new AutomationRootNode(); |
308 assertTrue(privates(tree).impl.unserialize(update)); | 308 assertTrue(privates(tree).impl.unserialize(update)); |
309 assertEq(true, tree.docLoaded); | 309 assertEq(true, tree.docLoaded); |
310 assertFalse('textSelStart' in tree); | 310 assertFalse('textSelStart' in tree); |
311 assertFalse('textSelEnd' in tree); | 311 assertFalse('textSelEnd' in tree); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 assertEq(1, cell4.tableCellColumnIndex); | 498 assertEq(1, cell4.tableCellColumnIndex); |
499 assertEq(1, cell4.tableCellColumnSpan); | 499 assertEq(1, cell4.tableCellColumnSpan); |
500 assertEq(1, cell4.tableCellRowIndex); | 500 assertEq(1, cell4.tableCellRowIndex); |
501 assertEq(1, cell4.tableCellRowSpan); | 501 assertEq(1, cell4.tableCellRowSpan); |
502 | 502 |
503 succeed(); | 503 succeed(); |
504 } | 504 } |
505 ]; | 505 ]; |
506 | 506 |
507 chrome.test.runTests(tests); | 507 chrome.test.runTests(tests); |
OLD | NEW |