diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-04-22 14:02:03 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-04-22 14:02:03 (GMT) |
commit | 1fb6bcf30f954e426f2d3002d14887574fb941dd (patch) | |
tree | 08cff7f2b879c50efe79e3c04d255075522af862 /test/uscxml/test-mmi-im.scxml | |
parent | 71c334bf4e35559496feac3f3cf00b72ceb88812 (diff) | |
download | uscxml-1fb6bcf30f954e426f2d3002d14887574fb941dd.zip uscxml-1fb6bcf30f954e426f2d3002d14887574fb941dd.tar.gz uscxml-1fb6bcf30f954e426f2d3002d14887574fb941dd.tar.bz2 |
Major refactoring
- Moved tests
- Changes to promela datamodel
- Implemented Trie
Diffstat (limited to 'test/uscxml/test-mmi-im.scxml')
-rw-r--r-- | test/uscxml/test-mmi-im.scxml | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/test/uscxml/test-mmi-im.scxml b/test/uscxml/test-mmi-im.scxml new file mode 100644 index 0000000..70cb3b8 --- /dev/null +++ b/test/uscxml/test-mmi-im.scxml @@ -0,0 +1,76 @@ +<scxml datamodel="ecmascript" name="mmi-test" + xmlns:mmi="http://www.w3.org/2008/04/mmi-arch" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns="http://www.w3.org/2005/07/scxml"> + + <script> +<![CDATA[ + + function dump(object, level) { + if (!level) level = 0; + + var padding = ""; + for (var j=0;j < level+1;j++) padding += " "; + + if (typeof(object) == 'object') { + for (var item in object) { + if (item === "lastChild") continue; + if (item === "firstChild") continue; + if (item === "ownerDocument") continue; + var value = object[item]; + + if(typeof(value) == 'object') { + print (padding + "'" + item + "' ...\n"); + dump (value, level+1); + } else { + print (padding + "'" + item + "' => \"" + value + "\"\n"); + } + } + } else { + print("===> " + object + " <===(" + typeof(object) + ")"); + } + } +]]> + </script> + + <state id="startmc"> + <!-- invoke type="vxml" id="mc.vxml" / --> + <!-- invoke type="xhtml" id="mc.xhtml" / --> + + <!-- Idle here and wait for events --> + <state id="idle"> + + <!-- setup session --> + <transition event="mmi.newcontextrequest" target="idle"> + + <send type="mmi.event"> + <content> + <mmi:NewContextResponse mmi:Status="success" /> + </content> + </send> + + <send type="mmi.event"> + <content> + <mmi:StartRequest> + <mmi:Content> + <html:form onmouseover ="mmiSession.send({ Name: 'onmouseover', Data: arguments[0] })"> + First name: <html:input type="text" name="firstname" /><html:br /> + Last name: <html:input type="text" name="lastname" /> + <html:input + onclick="mmiSession.send({ Name: 'onsubmit', Data: arguments[0] })" + type="button" value="Submit" /> + </html:form> + </mmi:Content> + </mmi:StartRequest> + </content> + </send> + </transition> + + <transition event="mmi.extensionnotification" target="idle"> + <!--script>dump(_event)</script --> + </transition> + + </state> + </state> + <final id="terminate" /> +</scxml>
\ No newline at end of file |