summaryrefslogtreecommitdiffstats
path: root/test/w3c/ecma
diff options
context:
space:
mode:
Diffstat (limited to 'test/w3c/ecma')
-rw-r--r--test/w3c/ecma/test179.scxml2
-rw-r--r--test/w3c/ecma/test193.scxml19
-rw-r--r--test/w3c/ecma/test233.scxml2
-rw-r--r--test/w3c/ecma/test286.scxml2
-rw-r--r--test/w3c/ecma/test294.scxml2
-rw-r--r--test/w3c/ecma/test298.scxml8
-rw-r--r--test/w3c/ecma/test311.scxml3
-rw-r--r--test/w3c/ecma/test329.scxml1
-rw-r--r--test/w3c/ecma/test330.scxml6
-rw-r--r--test/w3c/ecma/test331.scxml6
-rw-r--r--test/w3c/ecma/test350.scxml22
-rw-r--r--test/w3c/ecma/test354.scxml2
-rw-r--r--test/w3c/ecma/test401.scxml2
-rw-r--r--test/w3c/ecma/test402.scxml2
-rw-r--r--test/w3c/ecma/test446.scxml21
-rw-r--r--test/w3c/ecma/test458.txt1
-rw-r--r--test/w3c/ecma/test459.scxml35
-rw-r--r--test/w3c/ecma/test496.scxml18
-rw-r--r--test/w3c/ecma/test527.scxml2
-rw-r--r--test/w3c/ecma/test528.scxml1
-rw-r--r--test/w3c/ecma/test529.scxml2
-rw-r--r--test/w3c/ecma/test545.scxml17
-rw-r--r--test/w3c/ecma/test561.scxml4
-rw-r--r--test/w3c/ecma/test577.scxml21
-rw-r--r--test/w3c/ecma/test578.scxml2
-rw-r--r--test/w3c/ecma/test579.scxml61
-rw-r--r--test/w3c/ecma/test580.scxml48
27 files changed, 262 insertions, 50 deletions
diff --git a/test/w3c/ecma/test179.scxml b/test/w3c/ecma/test179.scxml
index 170b105..f5c9169 100644
--- a/test/w3c/ecma/test179.scxml
+++ b/test/w3c/ecma/test179.scxml
@@ -8,7 +8,7 @@
</send>
</onentry>
- <transition event="event1" cond="_event.data === '123'" target="pass"/>
+ <transition event="event1" cond="_event.data == 123" target="pass"/>
<transition event="*" target="fail"/>
</state>
diff --git a/test/w3c/ecma/test193.scxml b/test/w3c/ecma/test193.scxml
index 441a658..286513d 100644
--- a/test/w3c/ecma/test193.scxml
+++ b/test/w3c/ecma/test193.scxml
@@ -1,17 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?><!-- we test that omitting target and targetexpr of <send> when using the
-basichttp event i/o processor puts error.communication on the internal queue. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+SCXML event i/o processor puts the event on the external queue. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
<state id="s0">
<onentry>
- <!-- this should put an error in the internal queue -->
- <send event="event1" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
- <send event="fail"/>
+ <send event="internal"/>
+ <!-- this should put event1 in the external queue -->
+ <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
+ <send event="timeout" delay="1s"/>
</onentry>
- <transition event="error.communication" target="pass"/>
- <transition event="*" target="fail"/>
+ <transition event="event1" target="fail"/>
+ <transition event="internal" target="s1"/>
</state>
+
+ <state id="s1">
+ <transition event="event1" target="pass"/>
+ <transition event="timeout" target="fail"/>
+
+ </state>
<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
diff --git a/test/w3c/ecma/test233.scxml b/test/w3c/ecma/test233.scxml
index 3900d28..1e07c20 100644
--- a/test/w3c/ecma/test233.scxml
+++ b/test/w3c/ecma/test233.scxml
@@ -26,7 +26,7 @@ the transtitions. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf
</finalize>
</invoke>
- <transition event="childToParent" cond="" target="pass"/>
+ <transition event="childToParent" cond="Var1==2" target="pass"/>
<transition event="*" target="fail"/>
</state>
diff --git a/test/w3c/ecma/test286.scxml b/test/w3c/ecma/test286.scxml
index 596f2ba..1c4c6bd 100644
--- a/test/w3c/ecma/test286.scxml
+++ b/test/w3c/ecma/test286.scxml
@@ -4,7 +4,7 @@ where no error is raised --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns
<state id="s0">
<onentry>
- <assign location="Var1" expr="1"/>
+ <assign location="foo.bar.baz " expr="1"/>
<raise event="foo"/>
</onentry>
diff --git a/test/w3c/ecma/test294.scxml b/test/w3c/ecma/test294.scxml
index efd26f4..fea1d8c 100644
--- a/test/w3c/ecma/test294.scxml
+++ b/test/w3c/ecma/test294.scxml
@@ -24,7 +24,7 @@ that content inside donedata sets the full value of the event.data field --><scx
<state id="s1" initial="s11">
- <transition event="done.state.s1" cond="_event.data === 'foo'" target="pass">
+ <transition event="done.state.s1" cond="_event.data == 'foo'" target="pass">
</transition>
<transition event="done.state.s1" target="fail">
diff --git a/test/w3c/ecma/test298.scxml b/test/w3c/ecma/test298.scxml
index 6a82a95..38c0e6d 100644
--- a/test/w3c/ecma/test298.scxml
+++ b/test/w3c/ecma/test298.scxml
@@ -1,9 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- refence a non-existent data model location in param in donedata and see that the right error is raised --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+<?xml version="1.0" encoding="UTF-8"?><!-- reference a non-existent data model location in param in donedata and see that the right error is raised --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
<datamodel>
<data id="Var1" expr="0"/>
</datamodel>
<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+
<transition event="error.execution" target="pass"/>
<transition event="*" target="fail"/>
@@ -12,7 +16,7 @@
</state>
<final id="s02">
<donedata>
- <param name="Var3" location="Var2"/>
+ <param name="Var3" location="foo.bar.baz "/>
</donedata>
</final>
</state>
diff --git a/test/w3c/ecma/test311.scxml b/test/w3c/ecma/test311.scxml
index 851f3ad..9398c38 100644
--- a/test/w3c/ecma/test311.scxml
+++ b/test/w3c/ecma/test311.scxml
@@ -3,7 +3,8 @@
<state id="s0">
<onentry>
- <assign location="Var1" expr="1"/>
+ <send event="timeout" delay="1s"/>
+ <assign location="foo.bar.baz " expr="1"/>
</onentry>
<transition event="error.execution" target="pass"/>
<transition event=".*" target="fail"/>
diff --git a/test/w3c/ecma/test329.scxml b/test/w3c/ecma/test329.scxml
index 9a95643..586f15a 100644
--- a/test/w3c/ecma/test329.scxml
+++ b/test/w3c/ecma/test329.scxml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!-- test that none of the system variables can be modified --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript" name="machineName">
+ <script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" />
<datamodel>
<data id="Var1"/>
<data id="Var2"/>
diff --git a/test/w3c/ecma/test330.scxml b/test/w3c/ecma/test330.scxml
index 5cbf4bc..5488f96 100644
--- a/test/w3c/ecma/test330.scxml
+++ b/test/w3c/ecma/test330.scxml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- check that the required fields are present in both internal and external events --><scxml xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" name="machineName">
+<?xml version="1.0" encoding="UTF-8"?><!-- check that the required fields are present in both internal and external events --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" name="machineName">
<state id="s0">
<onentry>
@@ -17,7 +17,7 @@
</state>
- <final xmlns="http://www.w3.org/2005/07/scxml" id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final xmlns="http://www.w3.org/2005/07/scxml" id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+ <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+ <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
</scxml> \ No newline at end of file
diff --git a/test/w3c/ecma/test331.scxml b/test/w3c/ecma/test331.scxml
index e1271f0..82272ea 100644
--- a/test/w3c/ecma/test331.scxml
+++ b/test/w3c/ecma/test331.scxml
@@ -24,7 +24,7 @@
<state id="s2">
<onentry>
<!-- this will generate an error, which is a platform event -->
- <assign location="Var2" expr="1"/>
+ <assign location="foo.bar.baz " expr="1"/>
</onentry>
<transition event="error" target="s3">
<assign location="Var1" expr="_event.type"/>
@@ -54,7 +54,7 @@
</state>
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+ <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+ <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
</scxml> \ No newline at end of file
diff --git a/test/w3c/ecma/test350.scxml b/test/w3c/ecma/test350.scxml
deleted file mode 100644
index b401ab1..0000000
--- a/test/w3c/ecma/test350.scxml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that target value is used to decide what session to deliver the event to. A session should be
-able to send an event to itself using its own session ID as the target --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" version="1.0">
-<datamodel>
- <data id="Var1" expr="'#_scxml_' + _sessionid"/>
- </datamodel>
-
-<state id="s0">
-
- <onentry>
- <send delay="5s" event="timeout"/>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" targetexpr="Var1" event="s0Event"/>
- </onentry>
- <transition event="s0Event" target="pass"/>
- <transition event="*" target="fail"/>
-
-</state>
-
-
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
diff --git a/test/w3c/ecma/test354.scxml b/test/w3c/ecma/test354.scxml
index 3a3c33b..ef55794 100644
--- a/test/w3c/ecma/test354.scxml
+++ b/test/w3c/ecma/test354.scxml
@@ -40,7 +40,7 @@ and that correct values are used --><scxml xmlns="http://www.w3.org/2005/07/scxm
<content>foo</content>
</send>
</onentry>
- <transition event="event2" cond="_event.data === 'foo'" target="pass"/>
+ <transition event="event2" cond="_event.data == 'foo'" target="pass"/>
<transition event="*" target="fail"/>
</state>
diff --git a/test/w3c/ecma/test401.scxml b/test/w3c/ecma/test401.scxml
index 9ce7217..d5f0545 100644
--- a/test/w3c/ecma/test401.scxml
+++ b/test/w3c/ecma/test401.scxml
@@ -7,7 +7,7 @@ it was raised second --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:co
<onentry>
<send event="foo"/>
<!-- assigning to a non-existent location should raise an error -->
- <assign location="Var1" expr="2"/>
+ <assign location="foo.bar.baz " expr="2"/>
</onentry>
diff --git a/test/w3c/ecma/test402.scxml b/test/w3c/ecma/test402.scxml
index 104483d..969256e 100644
--- a/test/w3c/ecma/test402.scxml
+++ b/test/w3c/ecma/test402.scxml
@@ -14,7 +14,7 @@ are pulled off the internal queue in order, and that prefix matching works on th
<!-- the first internal event. The error will be the second, and event2 will be the third -->
<raise event="event1"/>
<!-- assigning to a non-existent location should raise an error -->
- <assign location="Var1" expr="2"/>
+ <assign location="foo.bar.baz " expr="2"/>
</onentry>
<transition event="event1" target="s02">
diff --git a/test/w3c/ecma/test446.scxml b/test/w3c/ecma/test446.scxml
new file mode 100644
index 0000000..0fa8698
--- /dev/null
+++ b/test/w3c/ecma/test446.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that if the child of <data> is JSON, the processor
+ assigns it as the value of the var --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="var1">[1, 2, 3]</data>
+ <data id="var2" src="file:test458.txt"/>
+ </datamodel>
+
+<state id="s0">
+ <transition cond="var1 instanceof Array" target="s1"/>
+ <transition target="fail"/>
+ </state>
+
+<state id="s1">
+ <transition cond="var2 instanceof Array" target="pass"/>
+ <transition target="fail"/>
+ </state>
+
+<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+
+</scxml> \ No newline at end of file
diff --git a/test/w3c/ecma/test458.txt b/test/w3c/ecma/test458.txt
new file mode 100644
index 0000000..6001c44
--- /dev/null
+++ b/test/w3c/ecma/test458.txt
@@ -0,0 +1 @@
+[1, 2, 3] \ No newline at end of file
diff --git a/test/w3c/ecma/test459.scxml b/test/w3c/ecma/test459.scxml
new file mode 100644
index 0000000..b631c25
--- /dev/null
+++ b/test/w3c/ecma/test459.scxml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that foreach goes over the array in the right order. since the array contains 1 2 3, we compare the current
+value with the previous value, which is stored in var1. The current value should always be larger. If
+it ever isn't, set Var4 to 0, indicating failure. Also check that the final value of the index
+is 2 (meaning that the initial value was 0, not 1) --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+<datamodel>
+ <data id="Var1" expr="0"/> <!-- contains the previous value -->
+ <data id="Var2"/> <!-- the item which will contain the current value -->
+ <data id="Var3"/> <!-- the index -->
+ <data id="Var4" expr="[1,2,3]"/>
+ <data id="Var5" expr="1"/> <!-- 1 if success, 0 if failure -->
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <foreach item="Var2" array="Var4" index="Var3">
+ <if cond="Var1&lt;Var2">
+ <assign location="Var1" expr="Var2"/>
+ <else/>
+ <!-- values are out of order, record failure -->
+ <assign location="Var5" expr="0"/>
+ </if>
+ </foreach>
+ </onentry>
+
+ <!-- check that var1 has its original value -->
+ <transition cond="Var4==0 | Var3 != 2" target="fail"/>
+ <transition target="pass"/>
+ </state>
+
+ <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+ <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+
+
+
+</scxml> \ No newline at end of file
diff --git a/test/w3c/ecma/test496.scxml b/test/w3c/ecma/test496.scxml
new file mode 100644
index 0000000..28c79a5
--- /dev/null
+++ b/test/w3c/ecma/test496.scxml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+
+
+<state id="s0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="event" target="#_scxml_foo"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.communication" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+
+
+ <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+ <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+
+</scxml> \ No newline at end of file
diff --git a/test/w3c/ecma/test527.scxml b/test/w3c/ecma/test527.scxml
index 426cc6c..623495a 100644
--- a/test/w3c/ecma/test527.scxml
+++ b/test/w3c/ecma/test527.scxml
@@ -3,7 +3,7 @@
<state id="s0" initial="s01">
- <transition event="done.state.s0" cond="_event.data === 'foo'" target="pass">
+ <transition event="done.state.s0" cond="_event.data == 'foo'" target="pass">
</transition>
<transition event="done.state.s0" target="fail">
diff --git a/test/w3c/ecma/test528.scxml b/test/w3c/ecma/test528.scxml
index f0e8911..891215f 100644
--- a/test/w3c/ecma/test528.scxml
+++ b/test/w3c/ecma/test528.scxml
@@ -6,7 +6,6 @@
<transition event="error.execution" target="s1"/>
<transition event="done.state.s0" target="fail"/>
- <transition event="done.state.s0" target="fail"/>
<state id="s01">
<transition target="s02"/>
diff --git a/test/w3c/ecma/test529.scxml b/test/w3c/ecma/test529.scxml
index 91dc002..0ef20c4 100644
--- a/test/w3c/ecma/test529.scxml
+++ b/test/w3c/ecma/test529.scxml
@@ -3,7 +3,7 @@
<state id="s0" initial="s01">
- <transition event="done.state.s0" cond="_event.data === '21'" target="pass">
+ <transition event="done.state.s0" cond="_event.data == 21" target="pass">
</transition>
<transition event="done.state.s0" target="fail">
diff --git a/test/w3c/ecma/test545.scxml b/test/w3c/ecma/test545.scxml
new file mode 100644
index 0000000..1e12770
--- /dev/null
+++ b/test/w3c/ecma/test545.scxml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that xml content in send is place as XML under event/data --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
+
+<state id="s0">
+ <onentry>
+ <send event="someevent">
+ <content><foo xmlns=""><bar>3</bar></foo></content>
+ </send>
+ </onentry>
+
+ <transition event="*" cond="$_event/data/foo/bar = 3" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+
+</scxml> \ No newline at end of file
diff --git a/test/w3c/ecma/test561.scxml b/test/w3c/ecma/test561.scxml
index e50e00c..e94a813 100644
--- a/test/w3c/ecma/test561.scxml
+++ b/test/w3c/ecma/test561.scxml
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that processor creates an ECMAScript object
- _event.data when receiving JSON in an event --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that processor creates an ECMAScript DOM object
+ _event.data when receiving XML in an event --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
<state id="s0">
diff --git a/test/w3c/ecma/test577.scxml b/test/w3c/ecma/test577.scxml
new file mode 100644
index 0000000..d115e88
--- /dev/null
+++ b/test/w3c/ecma/test577.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that that <send> without target in basichttp event i/o processor
+causes error.communication to get added to internal queue . --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" version="1.0">
+
+
+<state id="s0">
+ <onentry>
+ <!-- sent by scxml event i/o processor, added to external queue -->
+ <send event="event1"/>
+ <!-- should put error.communication on internal queue -->
+ <send event="test" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+
+ </onentry>
+
+
+ <transition event="error.communication" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+ <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+</scxml> \ No newline at end of file
diff --git a/test/w3c/ecma/test578.scxml b/test/w3c/ecma/test578.scxml
index bdb5e2d..9a25195 100644
--- a/test/w3c/ecma/test578.scxml
+++ b/test/w3c/ecma/test578.scxml
@@ -5,7 +5,7 @@
<state id="s0">
<onentry>
<send event="foo">
- <content>{ productName : "bar", size : 27 }</content>
+ <content>{ "productName" : "bar", "size" : 27 }</content>
</send>
</onentry>
<transition event="foo" cond="_event.data.productName == 'bar'" target="pass"/>
diff --git a/test/w3c/ecma/test579.scxml b/test/w3c/ecma/test579.scxml
new file mode 100644
index 0000000..f89b1a9
--- /dev/null
+++ b/test/w3c/ecma/test579.scxml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that default history content is executed correctly. The Process MUST execute any executable content in the transition after the parent state's onentry handlers, and, in the case where the history pseudo-state is the target of an <initial> transition,
+the executable content inside the <initial> transition. However the Processor MUST
+execute this content only if there is no stored history. Once the history state's
+parent state has been visited and exited, the default history content must not be executed --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" datamodel="ecmascript">
+
+
+<state id="s0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <initial>
+ <transition target="sh1">
+ <raise event="event2"/>
+ </transition>
+ </initial>
+ <onentry>
+ <send delay="2s" event="timeout"/>
+ <raise event="event1"/>
+ </onentry>
+ <onexit>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onexit>
+ <history id="sh1">
+ <transition target="s01">
+ <raise event="event3"/>
+ </transition>
+ </history>
+
+ <state id="s01">
+ <transition event="event1" target="s02"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s02">
+ <transition event="event2" target="s03"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s03">
+
+ <transition cond="Var1==0" event="event3" target="s0"/>
+ <transition cond="Var1==1" event="event1" target="s2"/>
+ <transition event="*" target="fail"/>
+ </state>
+</state>
+
+<state id="s2">
+ <transition event="event2" target="s3"/>
+ <transition event="*" target="fail"/>
+
+ </state>
+
+<state id="s3">
+ <transition event="event3" target="fail"/>
+ <transition event="timeout" target="pass"/>
+ </state>
+
+
+<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+
+</scxml> \ No newline at end of file
diff --git a/test/w3c/ecma/test580.scxml b/test/w3c/ecma/test580.scxml
new file mode 100644
index 0000000..4c4d522
--- /dev/null
+++ b/test/w3c/ecma/test580.scxml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that a history state never ends up part of the configuration --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="p1" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+
+<parallel id="p1">
+ <onentry>
+ <send delay="2s" event="timeout"/>
+ </onentry>
+
+
+ <state id="s0">
+ <transition cond="In('sh1')" target="fail"/>
+ <transition event="timeout" target="fail"/>
+ </state>
+
+
+<state id="s1">
+ <initial>
+ <transition target="sh1"/>
+ </initial>
+
+
+ <history id="sh1">
+ <transition target="s11"/>
+ </history>
+
+ <state id="s11">
+ <transition cond="In('sh1')" target="fail"/>
+ <transition target="s12"/>
+ </state>
+
+ <state id="s12"/>
+ <transition cond="In('sh1')" target="fail"/>
+ <transition cond="Var1==0" target="sh1"/>
+ <transition cond="Var1==1" target="pass"/>
+ <onexit>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onexit>
+ </state>
+
+
+ </parallel>
+
+<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+
+</scxml> \ No newline at end of file