| 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 var ActiveDescendantAttribute = [ 'activeDescendant' ]; | 5 var ActiveDescendantAttribute = [ 'activeDescendant' ]; |
| 6 var LinkAttributes = [ 'url' ]; | 6 var LinkAttributes = [ 'url' ]; |
| 7 var DocumentAttributes = [ 'docUrl', | 7 var DocumentAttributes = [ 'docUrl', |
| 8 'docTitle', | 8 'docTitle', |
| 9 'docLoaded', | 9 'docLoaded', |
| 10 'docLoadingProgress' ]; | 10 'docLoadingProgress' ]; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 assertFalse(attributeAttr in div); | 242 assertFalse(attributeAttr in div); |
| 243 } | 243 } |
| 244 chrome.test.succeed(); | 244 chrome.test.succeed(); |
| 245 }, | 245 }, |
| 246 | 246 |
| 247 function testHtmlAttributes() { | 247 function testHtmlAttributes() { |
| 248 var editable = rootNode.find({ role: 'textField' }); | 248 var editable = rootNode.find({ role: 'textField' }); |
| 249 assertTrue(editable !== undefined); | 249 assertTrue(editable !== undefined); |
| 250 assertEq('text', editable.htmlAttributes.type); | 250 assertEq('text', editable.htmlAttributes.type); |
| 251 chrome.test.succeed(); | 251 chrome.test.succeed(); |
| 252 }, | 252 } |
| 253 | |
| 254 function testNameFrom() { | |
| 255 var link = rootNode.find({ role: 'link' }); | |
| 256 assertEq(chrome.automation.NameFromType.CONTENTS, link.nameFrom); | |
| 257 var textarea = rootNode.find({ attributes: { name: 'textarea' } }); | |
| 258 assertEq(chrome.automation.NameFromType.ATTRIBUTE, textarea.nameFrom); | |
| 259 chrome.test.succeed(); | |
| 260 }, | |
| 261 ]; | 253 ]; |
| 262 | 254 |
| 263 setUpAndRunTests(allTests, 'attributes.html'); | 255 setUpAndRunTests(allTests, 'attributes.html'); |
| OLD | NEW |