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

Side by Side Diff: chrome/test/data/extensions/api_test/executescript/callback/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, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 relativePath = 5 var relativePath =
6 '/files/extensions/api_test/executescript/callback/test.html'; 6 '/extensions/api_test/executescript/callback/test.html';
7 var testUrl = 'http://b.com:PORT' + relativePath; 7 var testUrl = 'http://b.com:PORT' + relativePath;
8 8
9 chrome.test.getConfig(function(config) { 9 chrome.test.getConfig(function(config) {
10 testUrl = testUrl.replace(/PORT/, config.testServer.port); 10 testUrl = testUrl.replace(/PORT/, config.testServer.port);
11 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { 11 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
12 if (changeInfo.status != 'complete') 12 if (changeInfo.status != 'complete')
13 return; 13 return;
14 chrome.tabs.onUpdated.removeListener(arguments.callee); 14 chrome.tabs.onUpdated.removeListener(arguments.callee);
15 chrome.test.runTests([ 15 chrome.test.runTests([
16 16
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // form and is not null 159 // form and is not null
160 chrome.test.assertTrue(scriptVal[0] != null); 160 chrome.test.assertTrue(scriptVal[0] != null);
161 })); 161 }));
162 }); 162 });
163 } 163 }
164 ]); 164 ]);
165 }); 165 });
166 chrome.tabs.create({ url: testUrl }); 166 chrome.tabs.create({ url: testUrl });
167 167
168 }); 168 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698