mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
17
testing/web-platform/tests/fetch/nosniff/importscripts.js
Normal file
17
testing/web-platform/tests/fetch/nosniff/importscripts.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Testing importScripts()
|
||||
function log(w) { this.postMessage(w) }
|
||||
function f() { log("FAIL") }
|
||||
function p() { log("PASS") }
|
||||
|
||||
["", "?type=", "?type=x", "?type=x/x"].forEach(function(urlpart) {
|
||||
try {
|
||||
importScripts("resources/js.py" + urlpart)
|
||||
} catch(e) {
|
||||
(e.name == "NetworkError") ? p() : log("FAIL (no NetworkError exception): " + urlpart)
|
||||
}
|
||||
|
||||
})
|
||||
importScripts("resources/js.py?type=text/javascript&outcome=p")
|
||||
importScripts("resources/js.py?type=text/ecmascript&outcome=p")
|
||||
importScripts("resources/js.py?type=text/ecmascript;blah&outcome=p")
|
||||
log("END")
|
||||
Loading…
Add table
Add a link
Reference in a new issue