dom/inputmethod/mochitest/test_bug949059.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     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">
    18 inputmethod_setup(function() {
    19   runTest();
    20 });
    22 function runTest() {
    23   let im = navigator.mozInputMethod;
    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.');
    29   // Deactivate current page.
    30   SpecialPowers.wrap(im).setActive(false);
    31   ok(im.mgmt, 'The mgmt property should not be null.');
    33   inputmethod_cleanup();
    34 }
    36 </script>
    37 </pre>
    38 </body>
    39 </html>

mercurial