| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |