3 <script src="../fast/js/resources/js-test-pre.js"></script>
4 <script src="resources/web-intents-testing.js"></script>
6 var channel = new MessageChannel();
7 channel.port2.onMessage = function(e) {
8 debug("* got message");
11 function buttonClicked() {
13 var intent1 = new WebKitIntent("action1", "mime/type1", channel.port1, "not a port");
14 testFailed("Should have thrown TypeError");
16 if (!(e instanceof TypeError)) testFailed("Should throw type error on non-port arg");
19 var intent1 = new WebKitIntent("action1", "mime/type1", channel.port1, ["not a port"]);
20 testFailed("Should have thrown TypeError");
22 if (!(e instanceof TypeError)) testFailed("Should throw type error on non-port arg");
25 navigator.webkitStartActivity(new WebKitIntent("action1", "mime/type1", channel.port1, [channel.port1]));
26 debug("* sent intent");
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>