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

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

Issue 655273005: Implement AutomationNode.querySelector(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix heap-use-after-free issue by not keeping a scoped_ptr to automation_api_helper in extension_hel… 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 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 af464a2573a079b980d4cbcb2470a88c6610d6b7..0a3350066d012fc7031e4dccedddcaf9bff1aab2 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
@@ -18,8 +18,9 @@ function createTab(url, callback) {
});
}
-function setUpAndRunTests(allTests) {
- getUrlFromConfig(function(url) {
+function setUpAndRunTests(allTests, opt_path) {
+ var path = opt_path || 'index.html';
+ getUrlFromConfig(path, function(url) {
createTab(url, function(unused_tab) {
chrome.automation.getTree(function (returnedRootNode) {
rootNode = returnedRootNode;
@@ -35,10 +36,10 @@ function setUpAndRunTests(allTests) {
});
}
-function getUrlFromConfig(callback) {
+function getUrlFromConfig(path, callback) {
chrome.test.getConfig(function(config) {
assertTrue('testServer' in config, 'Expected testServer in config');
- var url = 'http://a.com:PORT/index.html'
+ var url = ('http://a.com:PORT/' + path)
.replace(/PORT/, config.testServer.port);
callback(url)
});

Powered by Google App Engine
This is Rietveld 408576698