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

Side by Side Diff: chrome/test/data/extensions/api_test/executescript/file_after_close/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 server = 'http://b.com:PORT'; 5 var server = 'http://b.com:PORT';
6 var relativePath = '/files/extensions/api_test/executescript/file_after_close/'; 6 var relativePath = '/extensions/api_test/executescript/file_after_close/';
7 var extensionPage = chrome.extension.getURL('extension_page.html'); 7 var extensionPage = chrome.extension.getURL('extension_page.html');
8 var webPage1 = server + relativePath + 'web_page1.html'; 8 var webPage1 = server + relativePath + 'web_page1.html';
9 var webPage2 = server + relativePath + 'web_page2.html'; 9 var webPage2 = server + relativePath + 'web_page2.html';
10 var extensionPageOpened = false; 10 var extensionPageOpened = false;
11 11
12 var listener = function(tabId, changeInfo, tab) { 12 var listener = function(tabId, changeInfo, tab) {
13 if (changeInfo.status != 'complete') 13 if (changeInfo.status != 'complete')
14 return; 14 return;
15 15
16 // web_page1 loaded, open extension page to inject script 16 // web_page1 loaded, open extension page to inject script
(...skipping 10 matching lines...) Expand all
27 } 27 }
28 }; 28 };
29 29
30 chrome.tabs.onUpdated.addListener(listener); 30 chrome.tabs.onUpdated.addListener(listener);
31 chrome.test.getConfig(function(config) { 31 chrome.test.getConfig(function(config) {
32 webPage1 = webPage1.replace(/PORT/, config.testServer.port); 32 webPage1 = webPage1.replace(/PORT/, config.testServer.port);
33 webPage2 = webPage2.replace(/PORT/, config.testServer.port); 33 webPage2 = webPage2.replace(/PORT/, config.testServer.port);
34 chrome.tabs.create({ url: webPage1 }); 34 chrome.tabs.create({ url: webPage1 });
35 }); 35 });
36 36
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698