Avoid script execution when not found

Fix #8391
This commit is contained in:
Shiroy 2016-03-25 22:32:08 +01:00
parent 90ab488d42
commit ee9bb1f3c6
5 changed files with 55 additions and 3 deletions

View file

@ -40150,6 +40150,14 @@
"url": "/webvtt/rendering/cues-with-video/processing-model/too_many_cues_wrapped.html"
}
]
},
"testharness": {
"html/semantics/scripting-1/the-script-element/script-not-found-not-executed.html": [
{
"path": "html/semantics/scripting-1/the-script-element/script-not-found-not-executed.html",
"url": "/html/semantics/scripting-1/the-script-element/script-not-found-not-executed.html"
}
]
}
},
"reftest_nodes": {

View file

@ -0,0 +1,4 @@
def main(request, response):
headers = [("Content-Type", "text/javascript")]
body = "test2_token = \"script executed\";"
return 200, headers, body

View file

@ -0,0 +1,19 @@
<!doctype html>
<meta charset="utf-8">
<title></title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>var test1_token = "script not executed";</script>
<script src="script-not-found-not-executed.py"></script>
<script>
test(function(){
assert_equals(test1_token, "script not executed");
}, "Script that 404");
</script>
<script>var test2_token = "script not executed";</script>
<script src="script-not-found-not-executed-2.py"></script>
<script>
test(function(){
assert_equals(test2_token, "script executed");
}, "Script that does not 404");
</script>

View file

@ -0,0 +1,4 @@
def main(request, response):
headers = [("Content-Type", "text/javascript")]
body = "test1_token = \"script executed\";"
return 404, headers, body