ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <script> |
| 4 | function print(message) |
| 5 | { |
| 6 | var paragraph = document.createElement("p"); |
| 7 | paragraph.appendChild(document.createTextNode(message)); |
| 8 | document.getElementById("console").appendChild(paragraph); |
| 9 | } |
| 10 | |
| 11 | function test() |
| 12 | { |
rniwa@webkit.org | 5cf7fa8 | 2012-06-15 07:38:37 +0000 | [diff] [blame] | 13 | if (window.testRunner) { |
| 14 | testRunner.dumpAsText(); |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 15 | } |
| 16 | |
robert@webkit.org | 7e68d0b | 2011-05-13 16:58:21 +0000 | [diff] [blame] | 17 | 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")); |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 26 | } |
| 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.org | 7e68d0b | 2011-05-13 16:58:21 +0000 | [diff] [blame] | 37 | type="application/x-webkit-test-netscape" |
dino@apple.com | b7d85de | 2019-03-13 23:37:32 +0000 | [diff] [blame] | 38 | width = 10 height = 10 |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 39 | > |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 40 | <PARAM name="autostart" value="false"> |
| 41 | |
| 42 | <EMBED |
| 43 | id="myE" |
robert@webkit.org | 7e68d0b | 2011-05-13 16:58:21 +0000 | [diff] [blame] | 44 | type="application/x-webkit-test-netscape" |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 45 | autostart="false" |
| 46 | enablejavascript="true" |
dino@apple.com | b7d85de | 2019-03-13 23:37:32 +0000 | [diff] [blame] | 47 | width = 10 height = 10 |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 48 | > |
| 49 | </EMBED> |
| 50 | </OBJECT> |
| 51 | |
aestes@apple.com | b1297d3 | 2010-08-27 00:32:15 +0000 | [diff] [blame] | 52 | <object id="myO2"> |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 53 | <embed |
| 54 | id="myE2" |
robert@webkit.org | 7e68d0b | 2011-05-13 16:58:21 +0000 | [diff] [blame] | 55 | type="application/x-webkit-test-netscape" |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 56 | autostart="false" |
| 57 | enablejavascript="true" |
dino@apple.com | b7d85de | 2019-03-13 23:37:32 +0000 | [diff] [blame] | 58 | width = 10 height = 10 |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 59 | > |
| 60 | </object> |
| 61 | |
| 62 | <object |
| 63 | data="resources/apple.gif" |
| 64 | type="image/gif" |
dino@apple.com | b7d85de | 2019-03-13 23:37:32 +0000 | [diff] [blame] | 65 | width = 10 height = 10 |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 66 | > |
| 67 | <embed |
| 68 | id="myE3" |
robert@webkit.org | 7e68d0b | 2011-05-13 16:58:21 +0000 | [diff] [blame] | 69 | type="application/x-webkit-test-netscape" |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 70 | autostart="false" |
| 71 | enablejavascript="true" |
dino@apple.com | b7d85de | 2019-03-13 23:37:32 +0000 | [diff] [blame] | 72 | width = 10 height = 10 |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 73 | > |
| 74 | </object> |
| 75 | |
| 76 | <object |
| 77 | data="resources/apple.gif" |
| 78 | type="image/gif" |
dino@apple.com | b7d85de | 2019-03-13 23:37:32 +0000 | [diff] [blame] | 79 | width = 10 height = 10 |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 80 | > |
| 81 | <object> |
| 82 | <embed |
| 83 | id="myE4" |
robert@webkit.org | 7e68d0b | 2011-05-13 16:58:21 +0000 | [diff] [blame] | 84 | type="application/x-webkit-test-netscape" |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 85 | autostart="false" |
| 86 | enablejavascript="true" |
dino@apple.com | b7d85de | 2019-03-13 23:37:32 +0000 | [diff] [blame] | 87 | width = 10 height = 10 |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 88 | > |
| 89 | </object> |
| 90 | </object> |
| 91 | |
| 92 | <embed |
| 93 | id="myE5" |
robert@webkit.org | 7e68d0b | 2011-05-13 16:58:21 +0000 | [diff] [blame] | 94 | type="application/x-webkit-test-netscape" |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 95 | autostart="false" |
| 96 | enablejavascript="true" |
dino@apple.com | b7d85de | 2019-03-13 23:37:32 +0000 | [diff] [blame] | 97 | width = 10 height = 10 |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 98 | > |
| 99 | |
aestes@apple.com | b1297d3 | 2010-08-27 00:32:15 +0000 | [diff] [blame] | 100 | <object |
| 101 | name="Plugin" |
robert@webkit.org | 7e68d0b | 2011-05-13 16:58:21 +0000 | [diff] [blame] | 102 | type="application/x-webkit-test-netscape" |
dino@apple.com | b7d85de | 2019-03-13 23:37:32 +0000 | [diff] [blame] | 103 | width = 10 height = 10 |
aestes@apple.com | b1297d3 | 2010-08-27 00:32:15 +0000 | [diff] [blame] | 104 | > |
aestes@apple.com | b1297d3 | 2010-08-27 00:32:15 +0000 | [diff] [blame] | 105 | <param name="autostart" value="false"> |
| 106 | <param name="enablejavascript" value="true"> |
| 107 | |
| 108 | <embed |
| 109 | name="Plugin" |
robert@webkit.org | 7e68d0b | 2011-05-13 16:58:21 +0000 | [diff] [blame] | 110 | type="application/x-webkit-test-netscape" |
aestes@apple.com | b1297d3 | 2010-08-27 00:32:15 +0000 | [diff] [blame] | 111 | autostart="false" |
| 112 | enablejavascript="true" |
dino@apple.com | b7d85de | 2019-03-13 23:37:32 +0000 | [diff] [blame] | 113 | width = 10 height = 10 |
aestes@apple.com | b1297d3 | 2010-08-27 00:32:15 +0000 | [diff] [blame] | 114 | > |
| 115 | </embed> |
| 116 | </object> |
| 117 | |
| 118 | <object name="Plugin2"> |
| 119 | <embed |
| 120 | name="Plugin2" |
robert@webkit.org | 7e68d0b | 2011-05-13 16:58:21 +0000 | [diff] [blame] | 121 | type="application/x-webkit-test-netscape" |
aestes@apple.com | b1297d3 | 2010-08-27 00:32:15 +0000 | [diff] [blame] | 122 | autostart="false" |
| 123 | enablejavascript="true" |
dino@apple.com | b7d85de | 2019-03-13 23:37:32 +0000 | [diff] [blame] | 124 | width = 10 height = 10 |
aestes@apple.com | b1297d3 | 2010-08-27 00:32:15 +0000 | [diff] [blame] | 125 | > |
| 126 | </embed> |
| 127 | </object> |
| 128 | |
ggaren | 8cc96fb | 2006-01-04 20:01:52 +0000 | [diff] [blame] | 129 | </body> |
| 130 | </html> |