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

Side by Side Diff: chrome/test/data/extensions/api_test/executescript/basic/test.js

Issue 16268017: GTTF: convert some tests in chrome to use EmbeddedTestServer patch nr 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 pass = chrome.test.callbackPass; 5 var pass = chrome.test.callbackPass;
6 var fail = chrome.test.callbackFail; 6 var fail = chrome.test.callbackFail;
7 var assertEq = chrome.test.assertEq; 7 var assertEq = chrome.test.assertEq;
8 var assertTrue = chrome.test.assertTrue; 8 var assertTrue = chrome.test.assertTrue;
9 var relativePath = 9 var relativePath =
10 '/files/extensions/api_test/executescript/basic/test_executescript.html'; 10 '/extensions/api_test/executescript/basic/test_executescript.html';
11 var testUrl = 'http://a.com:PORT' + relativePath; 11 var testUrl = 'http://a.com:PORT' + relativePath;
12 var testFailureUrl = 'http://b.com:PORT' + relativePath; 12 var testFailureUrl = 'http://b.com:PORT' + relativePath;
13 var firstEnter = true; 13 var firstEnter = true;
14 14
15 chrome.test.getConfig(function(config) { 15 chrome.test.getConfig(function(config) {
16 testUrl = testUrl.replace(/PORT/, config.testServer.port); 16 testUrl = testUrl.replace(/PORT/, config.testServer.port);
17 testFailureUrl = testFailureUrl.replace(/PORT/, config.testServer.port); 17 testFailureUrl = testFailureUrl.replace(/PORT/, config.testServer.port);
18 18
19 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { 19 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
20 if (changeInfo.status != 'complete') 20 if (changeInfo.status != 'complete')
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 chrome.tabs.executeScript(tabId, script_file, fail( 111 chrome.tabs.executeScript(tabId, script_file, fail(
112 'Code and file should not be specified ' + 112 'Code and file should not be specified ' +
113 'at the same time in the second argument.')); 113 'at the same time in the second argument.'));
114 } 114 }
115 ]); 115 ]);
116 }); 116 });
117 117
118 chrome.tabs.create({ url: testUrl }); 118 chrome.tabs.create({ url: testUrl });
119 }); 119 });
120 120
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698