OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 function getStyleURL() { | 5 function getStyleURL() { |
6 // This is not a style sheet, but it must still be classified as "stylesheet" | 6 // This is not a style sheet, but it must still be classified as "stylesheet" |
7 // because it is loaded as a style sheet. | 7 // because it is loaded as a style sheet. |
8 return getServerURL('empty.html?as-style'); | 8 return getServerURL('empty.html?as-style'); |
9 } | 9 } |
10 | 10 |
11 function getScriptURL() { | 11 function getScriptURL() { |
12 // The file is empty, so JS errors will not be generated upon execution. | 12 // The file is empty, so JS errors will not be generated upon execution. |
13 // | 13 // |
14 // We load from '127.0.0.1', as that is a whitelistable source of script | 14 // We load from '127.0.0.1', as that is a whitelistable source of script |
15 // from outside the extension's package. | 15 // from outside the extension's package. |
16 return getServerURL('empty.html?as-script', '127.0.0.1'); | 16 return getServerURL('empty.html?as-script', '127.0.0.1'); |
17 } | 17 } |
18 | 18 |
19 function getFontURL() { | 19 function getFontURL() { |
20 // Not a font, but will be loaded as a font. | 20 // Not a font, but will be loaded as a font. |
21 return getServerURL('empty.html?as-font'); | 21 return getServerURL('empty.html?as-font'); |
22 } | 22 } |
23 | 23 |
24 function getWorkerURL() { | 24 function getWorkerURL() { |
25 // This file is empty, so it does not generate JavaScript errors when loaded | 25 // This file is empty, so it does not generate JavaScript errors when loaded |
26 // as a worker script. | 26 // as a worker script. |
27 return getServerURL('empty.html?as-worker'); | 27 return getServerURL('empty.html?as-worker', '127.0.0.1'); |
28 } | 28 } |
29 | 29 |
30 function getPingURL() { | 30 function getPingURL() { |
31 return getServerURL('empty.html?as-ping'); | 31 return getServerURL('empty.html?as-ping'); |
32 } | 32 } |
33 | 33 |
34 function getBeaconURL() { | 34 function getBeaconURL() { |
35 return getServerURL('empty.html?as-beacon'); | 35 return getServerURL('empty.html?as-beacon'); |
36 } | 36 } |
37 | 37 |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 | 703 |
704 var frame = document.createElement('iframe'); | 704 var frame = document.createElement('iframe'); |
705 frame.src = | 705 frame.src = |
706 getServerURL('extensions/api_test/webrequest/csp/violation.html'); | 706 getServerURL('extensions/api_test/webrequest/csp/violation.html'); |
707 document.body.appendChild(frame); | 707 document.body.appendChild(frame); |
708 }, | 708 }, |
709 | 709 |
710 // Note: The 'websocket' type is tested separately in 'test_websocket.js' and | 710 // Note: The 'websocket' type is tested separately in 'test_websocket.js' and |
711 // 'test_websocket_auth.js'. | 711 // 'test_websocket_auth.js'. |
712 ]); | 712 ]); |
OLD | NEW |