OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
4 function print(message, color) | 4 function print(message, color) |
5 { | 5 { |
6 var paragraph = document.createElement("div"); | 6 var paragraph = document.createElement("div"); |
7 paragraph.appendChild(document.createTextNode(message)); | 7 paragraph.appendChild(document.createTextNode(message)); |
8 paragraph.style.fontFamily = "monospace"; | 8 paragraph.style.fontFamily = "monospace"; |
9 if (color) | 9 if (color) |
10 paragraph.style.color = color; | 10 paragraph.style.color = color; |
(...skipping 30 matching lines...) Expand all Loading... |
41 embed.width = 1; | 41 embed.width = 1; |
42 embed.type = 1; // setting the type attribute should not effect the plugin o
nce loaded | 42 embed.type = 1; // setting the type attribute should not effect the plugin o
nce loaded |
43 embed.src = 1; // setting the source attribute should not effect the plugin
once loaded | 43 embed.src = 1; // setting the source attribute should not effect the plugin
once loaded |
44 | 44 |
45 shouldBe("embed.getAttribute('align')", 1); | 45 shouldBe("embed.getAttribute('align')", 1); |
46 shouldBe("embed.getAttribute('height')", 1); | 46 shouldBe("embed.getAttribute('height')", 1); |
47 shouldBe("embed.getAttribute('name')", 1); | 47 shouldBe("embed.getAttribute('name')", 1); |
48 shouldBe("embed.getAttribute('width')", 1); | 48 shouldBe("embed.getAttribute('width')", 1); |
49 shouldBe("embed.getAttribute('type')", 1); | 49 shouldBe("embed.getAttribute('type')", 1); |
50 shouldBe("embed.getAttribute('src')", 1); | 50 shouldBe("embed.getAttribute('src')", 1); |
51 shouldBe("typeof embed.testCallback", "function"); | 51 shouldBe("typeof embed.postMessage", "function"); |
52 | 52 |
53 print("----------"); | 53 print("----------"); |
54 | 54 |
55 embed = document.createElement('embed'); | 55 embed = document.createElement('embed'); |
56 print("[Embed is dynamically created element with only type specified]"); | 56 print("[Embed is dynamically created element with only type specified]"); |
57 | 57 |
58 embed.style.visibility = "hidden"; | 58 embed.style.visibility = "hidden"; |
59 embed.type = "application/x-webkit-test-netscape"; | 59 embed.type = "application/x-blink-test-plugin"; |
60 document.body.appendChild(embed); | 60 document.body.appendChild(embed); |
61 shouldBe("typeof embed.testCallback", "function"); | 61 shouldBe("typeof embed.postMessage", "function"); |
62 | 62 |
63 print("----------"); | 63 print("----------"); |
64 | 64 |
65 embed = document.createElement('embed'); | 65 embed = document.createElement('embed'); |
66 print("[Embed is dynamically created element with only src specified]"); | 66 print("[Embed is dynamically created element with only src specified]"); |
67 | 67 |
68 embed.style.visibility = "hidden"; | 68 embed.style.visibility = "hidden"; |
69 embed.src = "resources/test.testnetscape"; | 69 embed.src = "resources/test.blinktestplugin"; |
70 document.body.appendChild(embed); | 70 document.body.appendChild(embed); |
71 shouldBe("typeof embed.testCallback", "function"); | 71 shouldBe("typeof embed.postMessage", "function"); |
72 } | 72 } |
73 </script> | 73 </script> |
74 </head> | 74 </head> |
75 | 75 |
76 <body onload="test();"> | 76 <body onload="test();"> |
77 | 77 |
78 <hr> | 78 <hr> |
79 <div id='console'></div> | 79 <div id='console'></div> |
80 | 80 |
81 <embed style="visibility: hidden" type="application/x-webkit-test-netscape" id='
embed'></embed> | 81 <embed style="visibility: hidden" type="application/x-blink-test-plugin" id='emb
ed'></embed> |
82 | 82 |
83 </body> | 83 </body> |
84 </html> | 84 </html> |
OLD | NEW |