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

Unified Diff: chrome/test/data/extensions/api_test/automation/tests/tabs/common.js

Issue 1365433002: Add setSelection function to automation API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nobrailleautostartintests
Patch Set: Change setDocumentSelection to take named arguments. Created 5 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/common.js
diff --git a/chrome/test/data/extensions/api_test/automation/tests/tabs/common.js b/chrome/test/data/extensions/api_test/automation/tests/tabs/common.js
index 3c4f61ccb2a3c1f0aa136a0af32823101d45520e..ac5eb32d038e70d379f7a9eb085c9dd8ff6b6095 100644
--- a/chrome/test/data/extensions/api_test/automation/tests/tabs/common.js
+++ b/chrome/test/data/extensions/api_test/automation/tests/tabs/common.js
@@ -19,6 +19,14 @@ function createTab(url, callback) {
});
}
+function listenOnce(node, eventType, callback, capture) {
+ var innerCallback = function(evt) {
+ node.removeEventListener(eventType, innerCallback, capture);
+ callback(evt);
+ };
+ node.addEventListener(eventType, innerCallback, capture);
+}
+
function setUpAndRunTests(allTests, opt_path) {
var path = opt_path || 'index.html';
getUrlFromConfig(path, function(url) {

Powered by Google App Engine
This is Rietveld 408576698