3 <script src=
"../resources/js-test.js"></script>
6 <embed id=
"embedElem" type=
"application/x-webkit-test-netscape" width=
100 height=
100></embed>
7 <object id=
"objectElem" type=
"application/x-webkit-test-netscape" windowedPlugin=
"false" width=
100 height=
100 tabIndex=
1></object>
9 <embed id=
"embedElemWithFallbackContents"
10 type=
"application/x-webkit-test-netscape" width=
100 height=
100 tabIndex=-
1>Fallback contents.
</embed>
11 <object id=
"objectElemWithFallbackContents" type=
"application/x-webkit-test-netscape" windowedPlugin=
"false" width=
100 height=
100>Fallback contents.
</object>
13 <embed id=
"noPluginEmbedElem" type=
"application/x-no-such-plugin" windowedPlugin=
"false" width=
100 height=
100 tabIndex=
1></embed>
14 <object id=
"noPluginObjectElem" type=
"application/x-no-such-plugin" windowedPlugin=
"false" width=
100 height=
100></object>
16 <embed id=
"noPluginEmbedElemWithFallbackContents"
17 type=
"application/x-no-such-plugin" windowedPlugin=
"false" width=
100 height=
100 tabIndex=
0>Fallback contents.
</embed>
18 <object id=
"noPluginObjectElemWithFallbackContents" type=
"application/x-no-such-plugin" windowedPlugin=
"false" width=
100 height=
100>Fallback contents.
</object>
20 <embed id=
"noPluginEmbedElemWithDisplayNone" type=
"application/x-no-such-plugin" windowedPlugin=
"false" width=
100 height=
100 tabindex=-
1 style=
"display:none"></embed>
21 <object id=
"noPluginObjectElemWithDisplayNone" type=
"application/x-no-such-plugin" windowedPlugin=
"false" width=
100 height=
100 style=
"display:none"></object>
23 <embed id=
"noPluginEmbedElemWithContenteditable"
24 type=
"application/x-no-such-plugin" windowedPlugin=
"false" width=
100 height=
100 contenteditable
></embed>
25 <object id=
"noPluginObjectElemWithContenteditable"
26 type=
"application/x-no-such-plugin" windowedPlugin=
"false" width=
100 height=
100 tabindex=-
1 contenteditable
></object>
30 description('Test for the tabIndex of embedded plugins. Plugins may be focusable so their tabIndex should be 0 by default.');
32 var owner
= document
.getElementById("embedOwner");
33 for (var i
= 0; i
< owner
.childNodes
.length
; ++i
) {
34 pluginElement
= owner
.childNodes
[i
];
35 if (pluginElement
.id
) {
36 tabIndexAttribute
= pluginElement
.getAttribute("tabindex");
37 expectedTabIndex
= tabIndexAttribute
? tabIndexAttribute
: '0';
38 shouldBe('"' + pluginElement
.id
+ '"; pluginElement.tabIndex', expectedTabIndex
);