mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-21 11:42:56 +03:00
add noscript warning to all tests so it is obvious when js is disabled
This commit is contained in:
parent
3cc80b6a7d
commit
f06ec6390a
@ -1,6 +1,7 @@
|
||||
<html>
|
||||
<head><title>moo</title></head>
|
||||
<body>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
var tree = (this ===window)
|
||||
console.log(tree);
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>Infinite loop</h1>
|
||||
<p>Before</p>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
|
||||
function bar(x) { return (x/2) + 1; }
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>Infinite recursion</h1>
|
||||
<p>Before</p>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
|
||||
function it_keeps_going_and_going_and_going(i) {
|
||||
|
@ -5,6 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>DOM getElementById element reference</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<p>This shows the text content of an element obtained using <a href="http://dom.spec.whatwg.org/#dom-document-getelementbyid">document.getElementById</a></p>
|
||||
<p>Referenced text</p>
|
||||
<p id="reftext">DOM getElementById element referenced test text</p>
|
||||
|
@ -6,6 +6,7 @@ p { color: red; background: #fdd; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
document.write('<style>p#foo { color: green; background: #dfd; }</style>');
|
||||
</script>
|
||||
|
@ -5,6 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>document location and URL interface</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
|
||||
<h2>Document location enumeration</h2>
|
||||
<script>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>Body element interface enumeration</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
function output(x,y) {
|
||||
document.body.appendChild(document.createTextNode(x));
|
||||
|
@ -4,6 +4,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Show cookie</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<p><script>document.write(document.cookie);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -5,6 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Document Location</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<p><b>document.location.href:</b> <script>document.write(document.location.href);</script></p>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>Document interface enumeration</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
function output(x,y) {
|
||||
document.body.appendChild(document.createTextNode(x));
|
||||
|
@ -7,6 +7,7 @@
|
||||
<body>
|
||||
<h1>HTMLElement test of attribute set/remove</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
var e = document.createElement("Div");
|
||||
var t = document.createTextNode("Some text in a div.");
|
||||
|
@ -5,6 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>DOM childElementCount reference</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<p><b>head.childElementCount:</b> <script>document.write(document.head.childElementCount);</script></p>
|
||||
<p><b>body.childElementCount:</b> <script>document.write(document.body.childElementCount);</script></p>
|
||||
</body>
|
||||
|
@ -7,6 +7,7 @@
|
||||
<body>
|
||||
<h1>HTMLElement test of attribute set/remove</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
var e = document.createElement("p");
|
||||
var t = document.createTextNode("Some text in a paragraph.");
|
||||
|
@ -5,6 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>DOM firstElementChild reference (body)</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<p><b>head.firstElementChild:</b> <script>document.write(document.head.firstElementChild.textContent);</script></p>
|
||||
<p><b>body.firstElementChild:</b> <script>document.write(document.body.firstElementChild.textContent);</script></p>
|
||||
<h1>DOM nodes should be 'null' if not present</h1>
|
||||
|
@ -5,6 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>DOM lastElementChild reference</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<p><b>head.lastElementChild:</b> <script>document.write(document.head.lastElementChild.textContent);</script></p>
|
||||
<p><b>body.lastElementChild:</b> <script>document.write(document.body.lastElementChild.textContent);</script></p>
|
||||
<h1>DOM nodes should be 'null' if not present</h1>
|
||||
|
@ -6,6 +6,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>DOM previousElementSibling and nextElementSibling reference</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<!-- comment node should be skipped -->
|
||||
<p><b>head.lastElementChild.previousElementSibling:</b> <script>document.write(document.head.lastElementChild.previousElementSibling.textContent);</script></p>
|
||||
<!-- comment node should be skipped -->
|
||||
|
@ -5,6 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="header" class="normal">DOM firstElementChild reference (#header .normal)</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<p><b>body.firstElementChild.id:</b> <script>document.write(document.body.firstElementChild.id);</script></p>
|
||||
<p><b>body.firstElementChild.className:</b> <script>document.write(document.body.firstElementChild.className);</script></p>
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Call getElementsByTagName</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<p>p one</p>
|
||||
<p>p two</p>
|
||||
<p>p three</p>
|
||||
|
@ -7,6 +7,7 @@
|
||||
<body>
|
||||
<h1>HTMLDivElement test</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
var e = document.createElement("Div");
|
||||
var t = document.createTextNode("This text should be aligned right.");
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>Node interface enumeration</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
function output(x,y) {
|
||||
document.body.appendChild(document.createTextNode(x));
|
||||
|
@ -4,6 +4,7 @@
|
||||
<body>
|
||||
<h1>Node::nodeType</h1>
|
||||
<h2>These should all resolve to true.</h2>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
document.write("<p>document is Node.DOCUMENT_NODE: ",
|
||||
document.nodeType === Node.DOCUMENT_NODE, "</p>");
|
||||
|
@ -4,6 +4,7 @@
|
||||
<body>
|
||||
<h1>Node::ParentNode</h1>
|
||||
<h2>These should all resolve to nodes of some kind.</h2>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
document.write("<p>document is: ",
|
||||
document, "</p>");
|
||||
|
@ -2,6 +2,7 @@
|
||||
<head>
|
||||
<title>alert onclick example</title>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script type="text/javascript">
|
||||
|
||||
function causealert()
|
||||
|
@ -2,6 +2,7 @@
|
||||
<head>
|
||||
<title>createTextNode onload example</title>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script type="text/javascript">
|
||||
|
||||
function addTextNode()
|
||||
|
@ -6,5 +6,6 @@
|
||||
|
||||
<body onload="alert('Running onload')">
|
||||
<h1>Just look at the log</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
<body>
|
||||
<h1>Just look at the log</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script type="text/javascript">
|
||||
document.body.onload = function() { alert("onload event from IDL attribute"); };
|
||||
</script>
|
||||
|
@ -7,6 +7,7 @@
|
||||
<body text="blue">
|
||||
<h1>Ensure that [TreatNullAs=EmptyString] works correctly</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
var e = document.createElement("p");
|
||||
var t = document.createTextNode("Initial body text:\""+document.body.text+"\" (should be \"blue\")");
|
||||
|
@ -6,6 +6,8 @@
|
||||
<body>
|
||||
<h1>JavaScript Tests</h1>
|
||||
|
||||
<noscript><h2>Javascript is disabled</h2></noscript>
|
||||
|
||||
<h2>General</h2>
|
||||
<ul>
|
||||
<li><a href="js-fractal.html">Fractal</a></li>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<body>
|
||||
<h1>Inline Script Simple Document Write</h1>
|
||||
<p>Before</p>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
document.write("<p>Hello World!<p>");
|
||||
</script>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>Inline Document Write Test</h1>
|
||||
<p>Before</p>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>document.write("<scr" +"ipt>document.write(\"Goodbye Cruel World\");</scri" + "pt>");</script>
|
||||
</script>
|
||||
<p>Afterwards</p>
|
||||
|
@ -7,6 +7,7 @@
|
||||
<h1>Inline Script innerHTML Test</h1>
|
||||
<p>Before</p>
|
||||
<p id="demo">some text you should never see</p>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script type="text/javascript">
|
||||
document.getElementById("demo").innerHTML="text inserted by script";
|
||||
</script>
|
||||
|
@ -6,6 +6,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>JavaScript generated mandelbrot set</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
function show_mandelbrot()
|
||||
{
|
||||
|
@ -5,6 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<pre>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
var start = new Date().getTime();
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>location interface assign</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
location.assign("location-enumerate.html");
|
||||
</script>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>location interface enumeration</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
function output(x,y) {
|
||||
document.body.appendChild(document.createTextNode(x));
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>location interface href</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
location.href = "location-enumerate.html";
|
||||
</script>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>location interface putforwards</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
location = "location-enumerate.html";
|
||||
</script>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>location interface replace</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
location.replace("location-enumerate.html");
|
||||
</script>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>navigator interface enumeration</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
function output(x,y) {
|
||||
document.body.appendChild(document.createTextNode(x));
|
||||
|
@ -6,9 +6,9 @@
|
||||
<body>
|
||||
<h1>Inline Document Write Test</h1>
|
||||
<p>Before</p>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>document.write("<scr" +"ipt>document.write(\"Goodbye Cruel World\");</scri" + "pt>");</script>
|
||||
</script>
|
||||
<noscript>Browser has scripting disabled</noscript>
|
||||
<p>Afterwards</p>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<body>
|
||||
<h1>Insuficient parameters error</h1>
|
||||
<p>Before</p>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
document.createComment();
|
||||
</script>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>Sync script Test (css)</h1>
|
||||
<p>Before</p>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script src="tst.js"></script>
|
||||
<p>Afterwards</p>
|
||||
</body>
|
||||
|
@ -5,6 +5,7 @@
|
||||
<body>
|
||||
<h1>Sync script Test with bad src</h1>
|
||||
<p>Before</p>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script src="notthere.js"></script>
|
||||
<script src="tst.js"></script>
|
||||
<p>Afterwards</p>
|
||||
|
@ -5,6 +5,7 @@
|
||||
<body>
|
||||
<h1>Sync script Test</h1>
|
||||
<p>Before</p>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script src="tst.js"></script>
|
||||
<p>Afterwards</p>
|
||||
</body>
|
||||
|
@ -4,6 +4,7 @@
|
||||
<h1>Check instanceof behaviour</h1>
|
||||
<table cellpadding=2 border=1>
|
||||
<tr><th>A</th><th>instanceof</th><th>B</th><th>?</th><th>Correct?</th></tr>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
var checks = [
|
||||
[ "window", "Window", true ],
|
||||
|
@ -4,6 +4,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Wikipedia lcm script</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script src="wikipedia-lcm.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<body>
|
||||
<h1>window interface enumeration</h1>
|
||||
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<script>
|
||||
function output(x,y) {
|
||||
document.body.appendChild(document.createTextNode(x));
|
||||
|
@ -5,6 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Assign window.lately</h1>
|
||||
<noscript><p>Javascript is disabled</p></noscript>
|
||||
<p>location: <script>document.write(location);</script>
|
||||
<p>location.protocol: <script>document.write(location.protocol);</script>
|
||||
<p>equivalence <script>document.write(location.protocol === 'http:');</script>
|
||||
|
Loading…
Reference in New Issue
Block a user