blob: e7d5397b568bb70901700746308dc08b93173f5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
<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.testRunner) {
testRunner.dumpAsText();
}
print("plugin <object> with nested plugin <embed>: should have a plugin and does " + (document.getElementById('myO').testCallback ? "" : "not"));
print("plugin <embed> netsted in plugin <object>: should have a plugin and does " + (document.getElementById('myE').testCallback ? "" : "not"));
print("empty <object> with nested plugin <embed>: should not have a plugin and does " + (document.getElementById('myO2').testCallback ? "" : "not"));
print("plugin <embed> nested in empty <object>: should have a plugin and does " + (document.getElementById('myE2').testCallback ? "" : "not"));
print("plugin <embed> nested in image <object>: should not have a plugin and does " + (document.getElementById('myE3').testCallback ? "" : "not"));
print("plugin <embed> nested in empty <object> nested in plugin <object>: should not have a plugin and does " + (document.getElementById('myE4').testCallback ? "" : "not"));
print("standalone plugin <embed>: should have a plugin and does " + (document.getElementById('myE5').testCallback ? "" : "not"));
function showPlugin(p) {
return p.testCallback ? ("[" + p.getAttribute('location') + "]") : "not";
}
print("plugin <object> with nested plugin <embed> of the same name should have an <embed> plugin and does " + showPlugin(document.Plugin));
print("empty <object> with nested plugin <embed> of the same name should have an <embed> plugin and does " + showPlugin(document.Plugin2));
}
</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"
type="application/x-webkit-test-netscape"
width = 0 height = 0
>
<PARAM name="src" value="resources/simple_blank.swf">
<PARAM name="autostart" value="false">
<EMBED
id="myE"
type="application/x-webkit-test-netscape"
autostart="false"
enablejavascript="true"
width = 0 height = 0
>
</EMBED>
</OBJECT>
<object id="myO2">
<embed
id="myE2"
type="application/x-webkit-test-netscape"
autostart="false"
enablejavascript="true"
width = 0 height = 0
>
</object>
<object
data="resources/apple.gif"
type="image/gif"
width = 0 height = 0
>
<embed
id="myE3"
type="application/x-webkit-test-netscape"
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"
type="application/x-webkit-test-netscape"
autostart="false"
enablejavascript="true"
width = 0 height = 0
>
</object>
</object>
<embed
id="myE5"
type="application/x-webkit-test-netscape"
autostart="false"
enablejavascript="true"
width = 0 height = 0
>
<object
name="Plugin"
type="application/x-webkit-test-netscape"
width = 0 height = 0
location="outer"
>
<param name="src" value="resources/simple_blank.swf">
<param name="autostart" value="false">
<param name="enablejavascript" value="true">
<embed
name="Plugin"
type="application/x-webkit-test-netscape"
autostart="false"
enablejavascript="true"
width = 0 height = 0
location="inner"
>
</embed>
</object>
<object name="Plugin2" location="outer">
<embed
name="Plugin2"
type="application/x-webkit-test-netscape"
autostart="false"
enablejavascript="true"
width = 0 height = 0
location="inner"
>
</embed>
</object>
</body>
</html>
|