[WK2] selection does not disappear after coping the text
[framework/web/webkit-efl.git] / LayoutTests / fast / html / unknown-tag.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7   Test HTMLUnknownElement
8   <p>
9   This test verifies the following:
10   <ol>
11   <li>The <code><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#htmlunknownelement">HTMLUnknownElement</a></code>
12       interface is used for HTML elements that are not defined by the HTML5
13       specification (or other applicable specifications).
14   <li>The <code><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#htmlunknownelement">HTMLUnknownElement</a></code>
15       interface is <b>not</b> used for HTML elements that <b>are</b> defined
16       by the HTML5 specification (or other applicable specifications).
17   </ol>
18   </p>
19   </p>
20   <div id="console"></div>
21
22   <b></b>
23   <foo1></foo1>
24   <foo2></foo2>
25
26   <font></font>
27   <h1></h1>
28   <table></table>
29
30   <script>
31 // These tags are required by the HTML spec
32 var validTags = ["div", "font", "h1", "table"];
33
34 // These tags are manufactured and should not be recognized by any browser
35 var bogusTags = ["foo1", "foo2"];
36
37 var allTags = validTags.concat(bogusTags);
38
39 function isBogusTag (tag) {
40     for (var k in bogusTags) {
41         var bogusTag = bogusTags[k];
42         if (tag == bogusTag) {
43             return true;
44         }
45     }
46     return false;
47 }
48
49 var DynamicElements = new Array();
50
51 for (var k in allTags) {
52     var tag = allTags[k];
53     DynamicElements[tag] = document.createElement(tag);
54 }
55
56 for (var element in DynamicElements) {
57     shouldBeTrue("DynamicElements[\"" + element + "\"]" + " instanceof HTMLElement");
58     if (isBogusTag(element)) {
59         shouldBeTrue("DynamicElements[\"" + element + "\"]" + " instanceof HTMLUnknownElement");
60     } else {
61         shouldBeFalse("DynamicElements[\"" + element + "\"]" + " instanceof HTMLUnknownElement");
62     }
63 }
64
65 var staticElements = new Array();
66
67 for (var k in allTags) {
68     var tag = allTags[k];
69     staticElements[tag] = document.getElementsByTagName(tag)[0];
70 }
71
72 for (var staticElement in staticElements) {
73     if (staticElements[staticElement]) {
74         if (isBogusTag(staticElement)) {
75             shouldBeTrue("staticElements[\"" + staticElement + "\"]" + " instanceof HTMLUnknownElement");
76         } else {
77             shouldBeFalse("staticElements[\"" + staticElement + "\"]" + " instanceof HTMLUnknownElement");
78         }
79     }
80 }
81 </script>
82   <script src="../../fast/js/resources/js-test-post.js"></script>
83 </body>
84 </html>