Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=953044
5 -->
6 <head>
7 <title>Basic test for InputMethod API.</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=953044">Mozilla Bug 953044</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 // Create an app frame to recieve keyboard inputs.
24 let app = document.createElement('iframe');
25 app.src = 'file_test_app.html';
26 app.setAttribute('mozbrowser', true);
27 document.body.appendChild(app);
29 // Create a browser frame to load the input method app.
30 let keyboard = document.createElement('iframe');
31 keyboard.setAttribute('mozbrowser', true);
32 document.body.appendChild(keyboard);
34 // Bug 953044 setInputMethodActive(false) before input method app loads should
35 // always succeed.
36 let req = keyboard.setInputMethodActive(false);
37 req.onsuccess = function() {
38 ok(true, 'setInputMethodActive before loading succeeded.');
39 inputmethod_cleanup();
40 };
42 req.onerror = function() {
43 ok(false, 'setInputMethodActive before loading failed: ' + this.error.name);
44 inputmethod_cleanup();
45 };
46 }
48 </script>
49 </pre>
50 </body>
51 </html>