blob: 95cbb0cbcc9db01da52f39d2512586922204f171 [file] [log] [blame]
<html>
<head>
<script>
function print(message)
{
var paragraph = document.createElement("p");
paragraph.appendChild(document.createTextNode(message));
document.getElementById("console").appendChild(paragraph);
}
function test()
{
if (window.layoutTestController) {
layoutTestController.dumpAsText();
}
print("plugin <object> with nested plugin <embed>: should have a plugin and does " + (document.getElementById('myO').Play ? "" : "not"));
print("plugin <embed> netsted in plugin <object>: should have a plugin and does " + (document.getElementById('myE').Play ? "" : "not"));
print("plugin <embed> nested in empty <object>: should have a plugin and does " + (document.getElementById('myE2').Play ? "" : "not"));
print("plugin <embed> nested in image <object>: should not have a plugin and does " + (document.getElementById('myE3').Play ? "" : "not"));
print("plugin <embed> nested in empty <object> nested in plugin <object>: should not have a plugin and does " + (document.getElementById('myE4').Play ? "" : "not"));
print("standalone plugin <embed>: should have a plugin and does " + (document.getElementById('myE5').Play ? "" : "not"));
}
</script>
</head>
<body onload="test()">
<p>This test checks for a regression against <i>rdar://problem/4214080 document.embeds: embeds[0].Play() undefined at languageguide.org</i>.</p>
<p>Each test below states its expected outcome.</p>
<hr>
<div id="console"></div>
<OBJECT
id="myO"
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
width = 0 height = 0
>
<PARAM name="src" value="resources/articles.m4a">
<PARAM name="autostart" value="false">
<EMBED
id="myE"
src="resources/articles.m4a"
autostart="false"
enablejavascript="true"
width = 0 height = 0
>
</EMBED>
</OBJECT>
<object>
<embed
id="myE2"
src="resources/articles.m4a"
autostart="false"
enablejavascript="true"
width = 0 height = 0
>
</object>
<object
data="resources/apple.gif"
type="image/gif"
width = 0 height = 0
>
<embed
id="myE3"
src="resources/articles.m4a"
autostart="false"
enablejavascript="true"
width = 0 height = 0
>
</object>
<object
data="resources/apple.gif"
type="image/gif"
width = 0 height = 0
>
<object>
<embed
id="myE4"
src="resources/articles.m4a"
autostart="false"
enablejavascript="true"
width = 0 height = 0
>
</object>
</object>
<embed
id="myE5"
src="resources/articles.m4a"
autostart="false"
enablejavascript="true"
width = 0 height = 0
>
</body>
</html>