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

Side by Side Diff: chrome/test/data/extensions/api_test/executescript/fragment/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) 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 got_request = false; 5 var got_request = false;
6 6
7 var test_url = "http://localhost:PORT/files/extensions/test_file.html"; 7 var test_url = "http://localhost:PORT/extensions/test_file.html";
8 8
9 // For running in normal chrome (ie outside of the browser_tests environment), 9 // For running in normal chrome (ie outside of the browser_tests environment),
10 // set debug to 1 here. 10 // set debug to 1 here.
11 var debug = 0; 11 var debug = 0;
12 if (debug) { 12 if (debug) {
13 test_url = "http://www.google.com/"; 13 test_url = "http://www.google.com/";
14 chrome.test.log = function(msg) { console.log(msg) }; 14 chrome.test.log = function(msg) { console.log(msg) };
15 chrome.test.runTests = function(tests) { 15 chrome.test.runTests = function(tests) {
16 for (var i in tests) { 16 for (var i in tests) {
17 tests[i](); 17 tests[i]();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 if (debug) { 62 if (debug) {
63 // No port to fix. Run tests directly. 63 // No port to fix. Run tests directly.
64 runTests(); 64 runTests();
65 } else { 65 } else {
66 chrome.test.getConfig(function(config) { 66 chrome.test.getConfig(function(config) {
67 test_url = test_url.replace(/PORT/, config.testServer.port); 67 test_url = test_url.replace(/PORT/, config.testServer.port);
68 runTests(); 68 runTests();
69 }); 69 });
70 } 70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698