summaryrefslogtreecommitdiffstats
path: root/dom/inputmethod/mochitest/test_bug953044.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/inputmethod/mochitest/test_bug953044.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/inputmethod/mochitest/test_bug953044.html')
-rw-r--r--dom/inputmethod/mochitest/test_bug953044.html52
1 files changed, 52 insertions, 0 deletions
diff --git a/dom/inputmethod/mochitest/test_bug953044.html b/dom/inputmethod/mochitest/test_bug953044.html
new file mode 100644
index 000000000..2b1f022a6
--- /dev/null
+++ b/dom/inputmethod/mochitest/test_bug953044.html
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=953044
+-->
+<head>
+ <title>Basic test for InputMethod API.</title>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=953044">Mozilla Bug 953044</a>
+<p id="display"></p>
+<pre id="test">
+<script class="testbody" type="application/javascript;version=1.7">
+
+inputmethod_setup(function() {
+ runTest();
+});
+
+function runTest() {
+ // Create an app frame to recieve keyboard inputs.
+ let app = document.createElement('iframe');
+ app.src = 'file_test_app.html';
+ app.setAttribute('mozbrowser', true);
+ document.body.appendChild(app);
+
+ // Create a browser frame to load the input method app.
+ let keyboard = document.createElement('iframe');
+ keyboard.setAttribute('mozbrowser', true);
+ document.body.appendChild(keyboard);
+
+ // Bug 953044 setInputMethodActive(false) before input method app loads should
+ // always succeed.
+ let req = keyboard.setInputMethodActive(false);
+ req.onsuccess = function() {
+ ok(true, 'setInputMethodActive before loading succeeded.');
+ inputmethod_cleanup();
+ };
+
+ req.onerror = function() {
+ ok(false, 'setInputMethodActive before loading failed: ' + this.error.name);
+ inputmethod_cleanup();
+ };
+}
+
+</script>
+</pre>
+</body>
+</html>
+