Chromium Code Reviews| 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 allTests = [ | 5 var allTests = [ |
| 6 function testSimpleAction() { | 6 function testQuery() { |
| 7 var okButton = rootNode.firstChild().firstChild(); | 7 var okButton = rootNode.firstChild().firstChild(); |
| 8 okButton.addEventListener(EventType.focus, function() { | 8 function assertCorrectResult(queryResult) { |
| 9 console.log(okButton.toString()); | |
| 10 console.log(queryResult.toString()); | |
| 11 assertEq(queryResult, okButton); | |
| 9 chrome.test.succeed(); | 12 chrome.test.succeed(); |
| 10 }, true); | 13 } |
| 11 okButton.focus(); | 14 |
| 15 rootNode.query({'selector': 'button'}, assertCorrectResult); | |
|
dmazzoni
2014/10/27 18:57:08
Please add a test that does some crazy CSS selecto
aboxhall
2014/10/28 23:43:57
Yeah, this is actually a terrible example anyway s
| |
| 12 } | 16 } |
| 13 ]; | 17 ]; |
| 14 | 18 |
| 15 setUpAndRunTests(allTests); | 19 setUpAndRunTests(allTests); |
| OLD | NEW |