|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=949059 |
|
5 --> |
|
6 <head> |
|
7 <title>Test "mgmt" property of MozInputMethod.</title> |
|
8 <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <script type="application/javascript;version=1.7" src="inputmethod_common.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=949059">Mozilla Bug 949059</a> |
|
14 <p id="display"></p> |
|
15 <pre id="test"> |
|
16 <script class="testbody" type="application/javascript;version=1.7"> |
|
17 |
|
18 inputmethod_setup(function() { |
|
19 runTest(); |
|
20 }); |
|
21 |
|
22 function runTest() { |
|
23 let im = navigator.mozInputMethod; |
|
24 |
|
25 // Treat current page as an input method and activate it. |
|
26 SpecialPowers.wrap(im).setActive(true); |
|
27 ok(im.mgmt, 'The mgmt property should not be null.'); |
|
28 |
|
29 // Deactivate current page. |
|
30 SpecialPowers.wrap(im).setActive(false); |
|
31 ok(im.mgmt, 'The mgmt property should not be null.'); |
|
32 |
|
33 inputmethod_cleanup(); |
|
34 } |
|
35 |
|
36 </script> |
|
37 </pre> |
|
38 </body> |
|
39 </html> |
|
40 |