summaryrefslogtreecommitdiff
path: root/js/test/Common/TestSuite.js
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-09-22 15:59:46 +0200
committerJose <jose@zeroc.com>2015-09-22 15:59:46 +0200
commit0d2d9bc597e3b4f549399e0826acb899cca42c62 (patch)
tree173cfb8f6774db14a966af9ac8b273e7497de4f9 /js/test/Common/TestSuite.js
parentSafari Web Worker test suite issues (diff)
downloadice-0d2d9bc597e3b4f549399e0826acb899cca42c62.tar.bz2
ice-0d2d9bc597e3b4f549399e0826acb899cca42c62.tar.xz
ice-0d2d9bc597e3b4f549399e0826acb899cca42c62.zip
JS test suite fixes
Diffstat (limited to 'js/test/Common/TestSuite.js')
-rw-r--r--js/test/Common/TestSuite.js43
1 files changed, 21 insertions, 22 deletions
diff --git a/js/test/Common/TestSuite.js b/js/test/Common/TestSuite.js
index 5add8b9cffd..8ae881027ee 100644
--- a/js/test/Common/TestSuite.js
+++ b/js/test/Common/TestSuite.js
@@ -57,6 +57,21 @@ $(document).ready(
next:"true"
}).toString());
}
+
+ function next(success)
+ {
+ if($("#loop").is(":checked"))
+ {
+ if(success)
+ {
+ nextTest(success);
+ }
+ }
+ else if(query.loop == "true")
+ {
+ updateLocation();
+ }
+ }
function setRunning(running)
{
@@ -112,14 +127,7 @@ $(document).ready(
else if(e.data.type == "TestFinished")
{
setRunning(false);
- if(e.data.success && $("#loop").is(":checked"))
- {
- nextTest();
- }
- else if(query.loop == "true")
- {
- updateLocation();
- }
+ next(e.data.success);
}
};
worker.postMessage(
@@ -138,26 +146,17 @@ $(document).ready(
}
else
{
- runTest(current,
- $("#language").val(),
- document.location.hostname || "127.0.0.1",
- $("#protocol").val(),
- TestCases[current].configurations, out).finally(
+ runTest(current, $("#language").val(), document.location.hostname || "127.0.0.1",
+ $("#protocol").val(), TestCases[current].configurations, out
+ ).finally(
function()
{
setRunning(false);
}
).then(
- function()
+ function(success)
{
- if($("#loop").is(":checked"))
- {
- nextTest();
- }
- else if(query.loop == "true")
- {
- updateLocation();
- }
+ next(success);
});
}
}