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

Side by Side Diff: chrome/test/data/extensions/api_test/webrequest_sendmessage/background.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 EVENT_MESSAGE_EXTENSION_STRING = "Extension"; 5 var EVENT_MESSAGE_EXTENSION_STRING = "Extension";
6 6
7 // Constants as functions, not to be called until after runTests. 7 // Constants as functions, not to be called until after runTests.
8 function getURLHttpSimpleLoad() { 8 function getURLHttpSimpleLoad() {
9 return getServerURL('files/extensions/api_test/webrequest/simpleLoad/a.html'); 9 return getServerURL('extensions/api_test/webrequest/simpleLoad/a.html');
10 } 10 }
11 11
12 function getServerURL(path) { 12 function getServerURL(path) {
13 return 'http://www.a.com:' + testServerPort + '/' + path; 13 return 'http://www.a.com:' + testServerPort + '/' + path;
14 } 14 }
15 15
16 function runTests(tests) { 16 function runTests(tests) {
17 chrome.test.getConfig(function(config) { 17 chrome.test.getConfig(function(config) {
18 testServerPort = config.testServer.port; 18 testServerPort = config.testServer.port;
19 chrome.test.runTests(tests); 19 chrome.test.runTests(tests);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 {message: EVENT_MESSAGE_EXTENSION_STRING}), 65 {message: EVENT_MESSAGE_EXTENSION_STRING}),
66 ], 66 ],
67 }; 67 };
68 chrome.declarativeWebRequest.onRequest.addRules([rule], function() { 68 chrome.declarativeWebRequest.onRequest.addRules([rule], function() {
69 chrome.tabs.create({"url": getURLHttpSimpleLoad()}); 69 chrome.tabs.create({"url": getURLHttpSimpleLoad()});
70 }); 70 });
71 }); 71 });
72 } 72 }
73 ]); 73 ]);
74 74
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698