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

Unified 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, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/automation/tests/tabs/query.js
diff --git a/chrome/test/data/extensions/api_test/automation/tests/tabs/actions.js b/chrome/test/data/extensions/api_test/automation/tests/tabs/query.js
similarity index 53%
copy from chrome/test/data/extensions/api_test/automation/tests/tabs/actions.js
copy to chrome/test/data/extensions/api_test/automation/tests/tabs/query.js
index e9387b995d49da1638260b09dbf5d052824d026b..644a84bb354dc3adcc1971efad8ee26e3b801b52 100644
--- a/chrome/test/data/extensions/api_test/automation/tests/tabs/actions.js
+++ b/chrome/test/data/extensions/api_test/automation/tests/tabs/query.js
@@ -3,12 +3,16 @@
// found in the LICENSE file.
var allTests = [
- function testSimpleAction() {
+ function testQuery() {
var okButton = rootNode.firstChild().firstChild();
- okButton.addEventListener(EventType.focus, function() {
+ function assertCorrectResult(queryResult) {
+ console.log(okButton.toString());
+ console.log(queryResult.toString());
+ assertEq(queryResult, okButton);
chrome.test.succeed();
- }, true);
- okButton.focus();
+ }
+
+ 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
}
];

Powered by Google App Engine
This is Rietveld 408576698