mirror of
https://github.com/servo/servo
synced 2026-05-02 12:26:06 +02:00
Expected to FAIL right now because contentDocument in iframes with src="javascript:..." wrongly returns null. Passes in Firefox though!
29 lines
804 B
HTML
29 lines
804 B
HTML
<!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>
|