gecko-dev/netwerk/test/mochitests/test_viewsource_unlinkable.html
Gijs Kruitbosch ef04fd0f90 Bug 1172165 - check all nested URI schemes in CAPS. Make view-source dangerous to load, and about: URIs use per-URI flags so they keep working, r=bz
Also, add an opt-out for crashtest/reftest for the view-source thing so they don't all break, r=bz

--HG--
extra : commitid : 8NqvmbphSgh
extra : rebase_source : bbe0b6f11a77d7e6241a5733931d9baa95bb3fed
2015-12-11 08:06:41 -05:00

28 lines
655 B
HTML

<!DOCTYPE HTML>
<html>
<!--
-->
<head>
<title>Test for view-source linkability</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script type="text/javascript">
function runTest() {
SimpleTest.doesThrow(function() {
window.open('view-source:' + location.href, "_blank");
}, "Trying to access view-source URL from unprivileged code should throw.");
SimpleTest.finish();
}
</script>
</head>
<body onload="runTest();">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
</body>
</html>