Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
5 <script>
6 function doIs(arg1, arg2, arg3) {
7 window.parent.postMessage("t " + encodeURIComponent(arg1) + " " +
8 encodeURIComponent(arg2) + " " +
9 encodeURIComponent(arg3), "*");
10 }
12 function $(arg) { return document.getElementById(arg); }
14 window.addEventListener("message",
15 function(evt) {
16 var t = $("target");
17 if (evt.data == "start") {
18 doIs(t.value, "Test", "Shouldn't have lost our initial value");
19 t.focus();
20 sendString("Foo");
21 doIs(t.value, "FooTest", "Typing should work");
22 window.parent.postMessage("c", "*");
23 } else {
24 doIs(evt.data, "continue", "Unexpected message");
25 doIs(t.value, "FooTest", "Shouldn't have lost our typed value");
26 sendString("Bar");
27 doIs(t.value, "BarFooTest", "Typing should still work");
28 window.parent.postMessage("f", "*");
29 }
30 },
31 "false");
33 </script>
34 </head>
35 <body>
36 <input id="target" value="Test">
37 </body>
38 </html>