wpt for javascript urls with queries and fragments

Expected to FAIL right now because contentDocument in iframes with
src="javascript:..." wrongly returns null. Passes in Firefox though!
This commit is contained in:
Benjamin Herr 2015-11-06 17:40:47 +01:00
parent 4120283e10
commit 066867eb86
3 changed files with 45 additions and 1 deletions

View file

@ -29809,7 +29809,16 @@
},
"local_changes": {
"deleted": [],
"items": {},
"items": {
"testharness": {
"html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html": [
{
"path": "html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html",
"url": "/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html"
}
]
}
},
"reftest_nodes": {}
},
"reftest_nodes": {

View file

@ -0,0 +1,7 @@
[javascript-url-query-fragment-components.html]
type: testharness
expected: OK
[iframes with javascript src]
expected: FAIL

View file

@ -0,0 +1,28 @@
<!doctype html>
<title> javascript url with query and fragment components </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var a = null;
var b = null;
var c = null;
</script>
<iframe id="a" src='javascript:"nope" ? "yep" : "what";'></iframe>
<iframe id="b" src='javascript:"wrong"; // # %0a "ok";'></iframe>
<iframe id="c" src='javascript:"%252525 ? %252525 # %252525"'></iframe>
<script>
var t = async_test("iframes with javascript src", {timeout:1000});
function check(id, expected) {
assert_equals(
document.getElementById(id).contentDocument.body.textContent,
expected);
}
onload = t.step_func(function() {
check("a", "yep");
check("b", "ok");
check("c", "%2525 ? %2525 # %2525");
t.done();
});
</script>