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

Side by Side Diff: chrome/test/data/extensions/api_test/executescript/in_frame/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) 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 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/in_frame/test_executescript.html'; 10 '/extensions/api_test/executescript/in_frame/test_executescript.html';
11 var testUrl = 'http://a.com:PORT' + relativePath; 11 var testUrl = 'http://a.com:PORT' + relativePath;
12 12
13 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { 13 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
14 if (changeInfo.status != 'complete') 14 if (changeInfo.status != 'complete')
15 return; 15 return;
16 16
17 chrome.test.runTests([ 17 chrome.test.runTests([
18 function executeJavaScriptCodeInAllFramesShouldSucceed() { 18 function executeJavaScriptCodeInAllFramesShouldSucceed() {
19 var script_file = {}; 19 var script_file = {};
20 script_file.code = "var extensionPort = chrome.runtime.connect();"; 20 script_file.code = "var extensionPort = chrome.runtime.connect();";
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 })); 62 }));
63 }); 63 });
64 } 64 }
65 ]); 65 ]);
66 }); 66 });
67 67
68 chrome.test.getConfig(function(config) { 68 chrome.test.getConfig(function(config) {
69 testUrl = testUrl.replace(/PORT/, config.testServer.port); 69 testUrl = testUrl.replace(/PORT/, config.testServer.port);
70 chrome.tabs.create({ url: testUrl }); 70 chrome.tabs.create({ url: testUrl });
71 }); 71 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698