Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / document-scripts.html
blobf8cd3837938cfb97ed6b1a6dbe3c031e75a8cc22
1 <html>
2 <head>
3 <script id="first"></script>
4 <script id="second">
5 function debug(str) {
6 var c = document.getElementById('console')
7 c.appendChild(document.createTextNode(str + '\n'));
10 function print(message, color)
12 var paragraph = document.createElement("div");
13 paragraph.appendChild(document.createTextNode(message));
14 paragraph.style.fontFamily = "monospace";
15 if (color)
16 paragraph.style.color = color;
17 document.getElementById("console").appendChild(paragraph);
20 var element, range, nodeFilter, cssRule, cssPrimitiveValue, cssStyleDeclaration, event;
21 var originalNodeConstructor;
23 function shouldBe(a, b)
25 var evalA;
26 try {
27 evalA = eval(a);
28 } catch(e) {
29 evalA = e;
31 if (evalA == b)
32 print("PASS: " + a + " should be " + b + " and is.", "green");
33 else
34 print("FAIL: " + a + " should be " + b + " but instead is " + evalA, "red");
37 function runTests() {
38 if (window.testRunner)
39 testRunner.dumpAsText();
41 shouldBe(document.scripts.length, 2);
42 shouldBe("document.scripts[0].id", "first");
43 shouldBe("document.scripts[1].id", "second");
46 </script>
47 </head>
48 <body onload="runTests();">
49 This tests that document.scripts works correctly.
50 <pre id="console">
51 </pre>
52 </body>
53 </html>