mirror of
https://github.com/servo/servo.git
synced 2025-06-17 12:54:28 +00:00
test that JS on a document without a browsing context isn't executed.
This commit is contained in:
parent
0c92e19e84
commit
2ecd57cfa3
2 changed files with 22 additions and 0 deletions
|
@ -35270,6 +35270,12 @@
|
||||||
"path": "html/semantics/forms/form-submission-0/submit-entity-body.html",
|
"path": "html/semantics/forms/form-submission-0/submit-entity-body.html",
|
||||||
"url": "/html/semantics/forms/form-submission-0/submit-entity-body.html"
|
"url": "/html/semantics/forms/form-submission-0/submit-entity-body.html"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"html/semantics/scripting-1/the-script-element/scripting-enabled.html": [
|
||||||
|
{
|
||||||
|
"path": "html/semantics/scripting-1/the-script-element/scripting-enabled.html",
|
||||||
|
"url": "/html/semantics/scripting-1/the-script-element/scripting-enabled.html"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>JS is disabled on documents created without a browsing context</title>
|
||||||
|
<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-n-script">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script>
|
||||||
|
test(function(t) {
|
||||||
|
var doc = document.implementation.createHTMLDocument();
|
||||||
|
window.fail_test = t.unreached_func('should not have been called');
|
||||||
|
|
||||||
|
var script = doc.createElement('script');
|
||||||
|
script.textContent = 'fail_test();';
|
||||||
|
doc.documentElement.appendChild(script);
|
||||||
|
}, 'script on document returned by createHTMLDocument should not execute');
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue