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

Side by Side Diff: chrome/test/data/extensions/api_test/automation/tests/tabs/query.js

Issue 655273005: Implement AutomationNode.querySelector(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 1 month 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 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);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698