add noscript warning to all tests so it is obvious when js is disabled

This commit is contained in:
Vincent Sanders 2016-02-04 15:11:19 +00:00
parent 3cc80b6a7d
commit f06ec6390a
48 changed files with 49 additions and 1 deletions

View File

@ -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);

View File

@ -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; }

View File

@ -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) {

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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));

View File

@ -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>

View File

@ -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>

View File

@ -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));

View File

@ -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.");

View File

@ -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>

View File

@ -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.");

View File

@ -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>

View File

@ -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>

View File

@ -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 -->

View File

@ -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>

View File

@ -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>

View File

@ -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.");

View File

@ -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));

View File

@ -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>");

View File

@ -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>");

View File

@ -2,6 +2,7 @@
<head>
<title>alert onclick example</title>
<noscript><p>Javascript is disabled</p></noscript>
<script type="text/javascript">
function causealert()

View File

@ -2,6 +2,7 @@
<head>
<title>createTextNode onload example</title>
<noscript><p>Javascript is disabled</p></noscript>
<script type="text/javascript">
function addTextNode()

View File

@ -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>

View File

@ -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>

View File

@ -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\")");

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -6,6 +6,7 @@
</head>
<body>
<h1>JavaScript generated mandelbrot set</h1>
<noscript><p>Javascript is disabled</p></noscript>
<script>
function show_mandelbrot()
{

View File

@ -5,6 +5,7 @@
</head>
<body>
<pre>
<noscript><p>Javascript is disabled</p></noscript>
<script>
var start = new Date().getTime();

View File

@ -6,6 +6,7 @@
<body>
<h1>location interface assign</h1>
<noscript><p>Javascript is disabled</p></noscript>
<script>
location.assign("location-enumerate.html");
</script>

View File

@ -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));

View File

@ -6,6 +6,7 @@
<body>
<h1>location interface href</h1>
<noscript><p>Javascript is disabled</p></noscript>
<script>
location.href = "location-enumerate.html";
</script>

View File

@ -6,6 +6,7 @@
<body>
<h1>location interface putforwards</h1>
<noscript><p>Javascript is disabled</p></noscript>
<script>
location = "location-enumerate.html";
</script>

View File

@ -6,6 +6,7 @@
<body>
<h1>location interface replace</h1>
<noscript><p>Javascript is disabled</p></noscript>
<script>
location.replace("location-enumerate.html");
</script>

View File

@ -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));

View File

@ -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>

View File

@ -3,6 +3,7 @@
<body>
<h1>Insuficient parameters error</h1>
<p>Before</p>
<noscript><p>Javascript is disabled</p></noscript>
<script>
document.createComment();
</script>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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 ],

View File

@ -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>

View File

@ -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));

View File

@ -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>