OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <meta id="test" name="foo" scheme="bar" http-equiv="content-type" content="text/
html; charset=UTF-8"> | 3 <meta id="test" name="foo" scheme="bar" http-equiv="content-type" content="text/
html; charset=UTF-8"> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 You should see 5 lines with "SUCCESS" below: | 6 You should see 5 lines with "SUCCESS" below: |
7 <script> | 7 <script> |
8 if (window.testRunner) | 8 if (window.testRunner) |
9 testRunner.dumpAsText(); | 9 testRunner.dumpAsText(); |
10 | 10 |
11 function checkExpected(actual, expected) | 11 function checkExpected(actual, expected) |
12 { | 12 { |
13 if (actual != expected) | 13 if (actual != expected) |
14 document.writeln("<p>FAILURE: expected \"" + expected + "\", actual \""
+ actual + "\"</p>"); | 14 document.writeln("<p>FAILURE: expected \"" + expected + "\", actual \""
+ actual + "\"</p>"); |
15 else | 15 else |
16 document.writeln("<p>SUCCESS (value: \"" + actual + "\")</p>"); | 16 document.writeln("<p>SUCCESS (value: \"" + actual + "\")</p>"); |
17 } | 17 } |
18 | 18 |
19 var metaTag = document.getElementById("test"); | 19 var metaTag = document.getElementById("test"); |
20 checkExpected(metaTag, "[object HTMLMetaElement]"); | 20 checkExpected(metaTag, "[object HTMLMetaElement]"); |
21 checkExpected(metaTag.name, "foo"); | 21 checkExpected(metaTag.name, "foo"); |
22 checkExpected(metaTag.scheme, "bar"); | 22 checkExpected(metaTag.scheme, "bar"); |
23 checkExpected(metaTag.httpEquiv, "content-type"); | 23 checkExpected(metaTag.httpEquiv, "content-type"); |
24 checkExpected(metaTag.content, "text/html; charset=UTF-8"); | 24 checkExpected(metaTag.content, "text/html; charset=UTF-8"); |
25 </script> | 25 </script> |
26 | 26 |
27 </body> | 27 </body> |
28 </html> | 28 </html> |
OLD | NEW |