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 window.externalCanary = "Alive"; | 5 window.externalCanary = "Alive"; |
6 | 6 |
7 chrome.test.getConfig(function(config) { | 7 chrome.test.getConfig(function(config) { |
8 | 8 |
9 function inlineScriptDoesNotRun() { | 9 function inlineScriptDoesNotRun() { |
10 chrome.test.assertEq(window.inlineCanary, undefined); | 10 chrome.test.assertEq(window.inlineCanary, undefined); |
11 chrome.test.runNextTest(); | 11 chrome.test.succeed(); |
12 } | 12 } |
13 | 13 |
14 function externalScriptDoesRun() { | 14 function externalScriptDoesRun() { |
15 // This test is somewhat zen in the sense that if external scripts are | 15 // This test is somewhat zen in the sense that if external scripts are |
16 // blocked, we don't be able to even execute the test harness... | 16 // blocked, we don't be able to even execute the test harness... |
17 chrome.test.assertEq(window.externalCanary, "Alive"); | 17 chrome.test.assertEq(window.externalCanary, "Alive"); |
18 chrome.test.runNextTest(); | 18 chrome.test.succeed(); |
19 } | 19 } |
20 | 20 |
21 chrome.test.runTests([ | 21 chrome.test.runTests([ |
22 inlineScriptDoesNotRun, | 22 inlineScriptDoesNotRun, |
23 externalScriptDoesRun | 23 externalScriptDoesRun |
24 ]); | 24 ]); |
25 }); | 25 }); |
OLD | NEW |