mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
"javascript:" urls: add web-platform-test
This commit is contained in:
parent
fa3e9ab244
commit
af41769d70
2 changed files with 38 additions and 0 deletions
|
@ -359897,6 +359897,12 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
"url/a-element-href-javascript.html": [
|
||||||
|
[
|
||||||
|
"/url/a-element-href-javascript.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
"url/a-element-origin-xhtml.xhtml": [
|
"url/a-element-origin-xhtml.xhtml": [
|
||||||
[
|
[
|
||||||
"/url/a-element-origin-xhtml.xhtml",
|
"/url/a-element-origin-xhtml.xhtml",
|
||||||
|
@ -600978,6 +600984,10 @@
|
||||||
"3dacc2783865ba292f20b72bc4c3942de521d9b0",
|
"3dacc2783865ba292f20b72bc4c3942de521d9b0",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
|
"url/a-element-href-javascript.html": [
|
||||||
|
"567d16dde294a2f3e75fdb8139d1af9a8c73e0fc",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
"url/a-element-origin-xhtml.xhtml": [
|
"url/a-element-origin-xhtml.xhtml": [
|
||||||
"56019fd2d3870324ba412e3e0c602bad3b90ef49",
|
"56019fd2d3870324ba412e3e0c602bad3b90ef49",
|
||||||
"testharness"
|
"testharness"
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var linkStatus = 'link not clicked';
|
||||||
|
|
||||||
|
function changeStatus() {
|
||||||
|
linkStatus = 'link has been clicked';
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<a id="javascript-link" href="javascript:changeStatus()">link</a>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
setup({explicit_done:true});
|
||||||
|
|
||||||
|
document.querySelector("#javascript-link").click();
|
||||||
|
|
||||||
|
step_timeout(function() {
|
||||||
|
test(function() {
|
||||||
|
assert_equals(linkStatus, "link has been clicked");
|
||||||
|
}, "javascript: scheme urls should be executed in correct global scope");
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue