Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=920977
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 920977 </title>
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=920977">Mozilla Bug 920977 </a>
14 <p id="display"></p>
15 <div id="content" style="display: none"></div>
16 <pre id="test">
17 <script type="application/javascript;version=1.8" src="file_framework.js"></script>
18 <script type="application/javascript;version=1.8">
19 function verifier(success, failure) {
20 try {
21 if (!this.getObj()) {
22 failure("Did not receive proper object");
23 return;
24 }
25 } catch (e) {
26 failure("Received exception!: " + e);
27 return;
28 }
30 try {
31 this.getObj().removeFocus();
32 } catch (e) {
33 failure("Received exception!: " + e);
34 return;
35 }
37 var iframe = document.createElement("iframe");
38 iframe.setAttribute("mozbrowser", true);
39 iframe.src = "http://example.org/";
40 iframe.addEventListener("load", function() {
41 iframe.removeEventListener("load", arguments.callee);
42 if (iframe.setInputMethodActive &&
43 typeof iframe.setInputMethodActive == "function") {
44 success("Got setInputMethodActive");
45 } else {
46 failure("Didn't get setInputMethodActive") ;
47 }
48 });
50 document.getElementById('content').appendChild(iframe);
51 }
53 var gData = [
54 {
55 perm: ["input-manage", "browser"],
56 needParentPerm: true,
57 obj: "mozInputMethod",
58 webidl: "MozInputMethod",
59 settings: [["dom.mozInputMethod.enabled", true],
60 ["dom.mozBrowserFramesEnabled", true]],
61 verifier: verifier.toSource()
62 }
63 ]
64 </script>
65 </pre>
66 </body>
67 </html>