5 <script src="../fast/js/resources/js-test-pre.js"></script>
8 testRunner.overridePreference("WebKitJavaEnabled", "1");
12 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=32292">bug 32292</a>:
13 "Unable to focus on embedded plugins such as Flash via javascript focus()"</p>
14 <p>This tests focusing Applets. See LayoutTests/plugins for Embed and Object elements.</p>
17 <applet id="appletElem" width=150 height=25 code="SharedApplet.class" name="javaTest" shouldFocus=true></applet>
19 <applet id="appletElemWithFallbackContents" width=150 height=25 code="SharedApplet.class" name="javaTest" shouldFocus=true>Fallback Contents.</applet>
21 <applet id="noCodeAppletElem" width=150 height=25 code="DoesNotExist.class" shouldFocus=false></applet>
23 <applet id="noCodeAppletElemWithFallbackContents" width=150 height=25 code="DoesNotExist.class" shouldFocus=false>Fallback contents.</applet>
25 <applet id="noCodeAppletElemWithTabindex" width=150 height=25 code="DoesNotExist.class" tabindex=-1 shouldFocus=true></applet>
27 <applet id="noCodeAppletElemWithContenteditable" width=150 height=25 code="DoesNotExist.class" shouldFocus=true></applet>
32 description("Test for Applet for bug 32292: Unable to focus on embedded plugins such as Flash via javascript focus().");
35 var owner = document.getElementById("appletOwner");
36 for (var i = 0; i < owner.childNodes.length; ++i) {
37 pluginElement = owner.childNodes[i];
38 if (pluginElement.id) {
39 pluginElement.focus();
40 shouldBe('"' + pluginElement.id + '"; document.activeElement === pluginElement',
41 pluginElement.getAttribute("shouldFocus").toString());
47 document.addEventListener("DOMContentLoaded", RunTest, false);
50 <script src="../fast/js/resources/js-test-post.js"></script>