Handle keypad while WebPage sets the focus automatically
[framework/web/webkit-efl.git] / LayoutTests / webintents / web-intents-invoke-port.html
1 <html>
2   <head>
3     <script src="../fast/js/resources/js-test-pre.js"></script>
4     <script src="resources/web-intents-testing.js"></script>
5     <script>
6       var channel = new MessageChannel();
7       channel.port2.onMessage = function(e) {
8         debug("* got message");
9       };
10
11       function buttonClicked() {
12         try {
13           var intent1 = new WebKitIntent("action1", "mime/type1", channel.port1, "not a port");
14           testFailed("Should have thrown TypeError");
15         } catch (e) {
16           if (!(e instanceof TypeError)) testFailed("Should throw type error on non-port arg");
17         }
18         try {
19           var intent1 = new WebKitIntent("action1", "mime/type1", channel.port1, ["not a port"]);
20           testFailed("Should have thrown TypeError");
21         } catch (e) {
22           if (!(e instanceof TypeError)) testFailed("Should throw type error on non-port arg");
23         }
24
25         navigator.webkitStartActivity(new WebKitIntent("action1", "mime/type1", channel.port1, [channel.port1]));
26         debug("* sent intent");
27       }
28     </script>
29   </head>
30 <body onload="simulateButtonPress()">
31 <input type="button" id="button" value="Start Web Intent" onmouseup="buttonClicked()">
32 <script src="../fast/js/resources/js-test-post.js"></script>
33 </body>
34 </html>