blob: 5ed1d23aacceedfb181b6dae8a5fc85225b5788c [file] [log] [blame]
ggaren8cc96fb2006-01-04 20:01:52 +00001<html>
2<head>
3<script>
4function print(message)
5{
6 var paragraph = document.createElement("p");
7 paragraph.appendChild(document.createTextNode(message));
8 document.getElementById("console").appendChild(paragraph);
9}
10
11function test()
12{
rniwa@webkit.org5cf7fa82012-06-15 07:38:37 +000013 if (window.testRunner) {
14 testRunner.dumpAsText();
ggaren8cc96fb2006-01-04 20:01:52 +000015 }
16
robert@webkit.org7e68d0b2011-05-13 16:58:21 +000017 print("plugin <object> with nested plugin <embed>: should have a plugin and does " + (document.getElementById('myO').testCallback ? "" : "not"));
18 print("plugin <embed> netsted in plugin <object>: should have a plugin and does " + (document.getElementById('myE').testCallback ? "" : "not"));
19 print("empty <object> with nested plugin <embed>: should not have a plugin and does " + (document.getElementById('myO2').testCallback ? "" : "not"));
20 print("plugin <embed> nested in empty <object>: should have a plugin and does " + (document.getElementById('myE2').testCallback ? "" : "not"));
21 print("plugin <embed> nested in image <object>: should not have a plugin and does " + (document.getElementById('myE3').testCallback ? "" : "not"));
22 print("plugin <embed> nested in empty <object> nested in plugin <object>: should not have a plugin and does " + (document.getElementById('myE4').testCallback ? "" : "not"));
23 print("standalone plugin <embed>: should have a plugin and does " + (document.getElementById('myE5').testCallback ? "" : "not"));
24 print("plugin <object> with nested plugin <embed> of the same name should have a plugin and does " + (document.Plugin.testCallback ? "" : "not"));
25 print("empty <object> with nested plugin <embed> of the same name should have a plugin and does " + (document.Plugin2.testCallback ? "" : "not"));
ggaren8cc96fb2006-01-04 20:01:52 +000026}
27</script>
28</head>
29<body onload="test()">
30<p>This test checks for a regression against <i>rdar://problem/4214080 document.embeds: embeds[0].Play() undefined at languageguide.org</i>.</p>
31<p>Each test below states its expected outcome.</p>
32<hr>
33<div id="console"></div>
34
35<OBJECT
36 id="myO"
robert@webkit.org7e68d0b2011-05-13 16:58:21 +000037 type="application/x-webkit-test-netscape"
dino@apple.comb7d85de2019-03-13 23:37:32 +000038 width = 10 height = 10
ggaren8cc96fb2006-01-04 20:01:52 +000039 >
ggaren8cc96fb2006-01-04 20:01:52 +000040 <PARAM name="autostart" value="false">
41
42 <EMBED
43 id="myE"
robert@webkit.org7e68d0b2011-05-13 16:58:21 +000044 type="application/x-webkit-test-netscape"
ggaren8cc96fb2006-01-04 20:01:52 +000045 autostart="false"
46 enablejavascript="true"
dino@apple.comb7d85de2019-03-13 23:37:32 +000047 width = 10 height = 10
ggaren8cc96fb2006-01-04 20:01:52 +000048 >
49 </EMBED>
50</OBJECT>
51
aestes@apple.comb1297d32010-08-27 00:32:15 +000052<object id="myO2">
ggaren8cc96fb2006-01-04 20:01:52 +000053 <embed
54 id="myE2"
robert@webkit.org7e68d0b2011-05-13 16:58:21 +000055 type="application/x-webkit-test-netscape"
ggaren8cc96fb2006-01-04 20:01:52 +000056 autostart="false"
57 enablejavascript="true"
dino@apple.comb7d85de2019-03-13 23:37:32 +000058 width = 10 height = 10
ggaren8cc96fb2006-01-04 20:01:52 +000059 >
60</object>
61
62<object
63 data="resources/apple.gif"
64 type="image/gif"
dino@apple.comb7d85de2019-03-13 23:37:32 +000065 width = 10 height = 10
ggaren8cc96fb2006-01-04 20:01:52 +000066>
67 <embed
68 id="myE3"
robert@webkit.org7e68d0b2011-05-13 16:58:21 +000069 type="application/x-webkit-test-netscape"
ggaren8cc96fb2006-01-04 20:01:52 +000070 autostart="false"
71 enablejavascript="true"
dino@apple.comb7d85de2019-03-13 23:37:32 +000072 width = 10 height = 10
ggaren8cc96fb2006-01-04 20:01:52 +000073 >
74</object>
75
76<object
77 data="resources/apple.gif"
78 type="image/gif"
dino@apple.comb7d85de2019-03-13 23:37:32 +000079 width = 10 height = 10
ggaren8cc96fb2006-01-04 20:01:52 +000080>
81 <object>
82 <embed
83 id="myE4"
robert@webkit.org7e68d0b2011-05-13 16:58:21 +000084 type="application/x-webkit-test-netscape"
ggaren8cc96fb2006-01-04 20:01:52 +000085 autostart="false"
86 enablejavascript="true"
dino@apple.comb7d85de2019-03-13 23:37:32 +000087 width = 10 height = 10
ggaren8cc96fb2006-01-04 20:01:52 +000088 >
89 </object>
90</object>
91
92<embed
93 id="myE5"
robert@webkit.org7e68d0b2011-05-13 16:58:21 +000094 type="application/x-webkit-test-netscape"
ggaren8cc96fb2006-01-04 20:01:52 +000095 autostart="false"
96 enablejavascript="true"
dino@apple.comb7d85de2019-03-13 23:37:32 +000097 width = 10 height = 10
ggaren8cc96fb2006-01-04 20:01:52 +000098>
99
aestes@apple.comb1297d32010-08-27 00:32:15 +0000100<object
101 name="Plugin"
robert@webkit.org7e68d0b2011-05-13 16:58:21 +0000102 type="application/x-webkit-test-netscape"
dino@apple.comb7d85de2019-03-13 23:37:32 +0000103 width = 10 height = 10
aestes@apple.comb1297d32010-08-27 00:32:15 +0000104 >
aestes@apple.comb1297d32010-08-27 00:32:15 +0000105 <param name="autostart" value="false">
106 <param name="enablejavascript" value="true">
107
108 <embed
109 name="Plugin"
robert@webkit.org7e68d0b2011-05-13 16:58:21 +0000110 type="application/x-webkit-test-netscape"
aestes@apple.comb1297d32010-08-27 00:32:15 +0000111 autostart="false"
112 enablejavascript="true"
dino@apple.comb7d85de2019-03-13 23:37:32 +0000113 width = 10 height = 10
aestes@apple.comb1297d32010-08-27 00:32:15 +0000114 >
115 </embed>
116</object>
117
118<object name="Plugin2">
119 <embed
120 name="Plugin2"
robert@webkit.org7e68d0b2011-05-13 16:58:21 +0000121 type="application/x-webkit-test-netscape"
aestes@apple.comb1297d32010-08-27 00:32:15 +0000122 autostart="false"
123 enablejavascript="true"
dino@apple.comb7d85de2019-03-13 23:37:32 +0000124 width = 10 height = 10
aestes@apple.comb1297d32010-08-27 00:32:15 +0000125 >
126 </embed>
127</object>
128
ggaren8cc96fb2006-01-04 20:01:52 +0000129</body>
130</html>