1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/inputmethod/mochitest/test_bug949059.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,40 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=949059 1.8 +--> 1.9 +<head> 1.10 + <title>Test "mgmt" property of MozInputMethod.</title> 1.11 + <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <script type="application/javascript;version=1.7" src="inputmethod_common.js"></script> 1.13 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.14 +</head> 1.15 +<body> 1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=949059">Mozilla Bug 949059</a> 1.17 +<p id="display"></p> 1.18 +<pre id="test"> 1.19 +<script class="testbody" type="application/javascript;version=1.7"> 1.20 + 1.21 +inputmethod_setup(function() { 1.22 + runTest(); 1.23 +}); 1.24 + 1.25 +function runTest() { 1.26 + let im = navigator.mozInputMethod; 1.27 + 1.28 + // Treat current page as an input method and activate it. 1.29 + SpecialPowers.wrap(im).setActive(true); 1.30 + ok(im.mgmt, 'The mgmt property should not be null.'); 1.31 + 1.32 + // Deactivate current page. 1.33 + SpecialPowers.wrap(im).setActive(false); 1.34 + ok(im.mgmt, 'The mgmt property should not be null.'); 1.35 + 1.36 + inputmethod_cleanup(); 1.37 +} 1.38 + 1.39 +</script> 1.40 +</pre> 1.41 +</body> 1.42 +</html> 1.43 +