summaryrefslogtreecommitdiff
path: root/test/wasm.js
diff options
context:
space:
mode:
authorMichael Ferris <mike.ferris@hotmail.com>2016-06-08 10:09:25 -0700
committerBen Smith <binjimin@gmail.com>2016-06-08 10:09:25 -0700
commit88acd087e8b758f72a60f07e79c6febf37f0b84e (patch)
tree556b87320af108107078511a2ea3a1f1aa690cb8 /test/wasm.js
parente8f8aa4eddc2e27251690027263b61b9138dbcd7 (diff)
downloadwabt-88acd087e8b758f72a60f07e79c6febf37f0b84e.tar.gz
wabt-88acd087e8b758f72a60f07e79c6febf37f0b84e.tar.bz2
wabt-88acd087e8b758f72a60f07e79c6febf37f0b84e.zip
Teach test scripts about ch.exe (#87)
Diffstat (limited to 'test/wasm.js')
-rw-r--r--test/wasm.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/wasm.js b/test/wasm.js
index 6f208ef6..7b38c18a 100644
--- a/test/wasm.js
+++ b/test/wasm.js
@@ -14,9 +14,19 @@
* limitations under the License.
*/
-/* polyfill from SM to D8 */
+/* polyfill from SM/CH to D8 */
if (typeof arguments == 'undefined') {
- arguments = scriptArgs;
+ if (typeof scriptArgs != 'undefined') {
+ arguments = scriptArgs;
+ } else if(typeof WScript != 'undefined') {
+ arguments = WScript.Arguments || [];
+ }
+}
+
+if (typeof quit == 'undefined') {
+ if (typeof WScript != 'undefined') {
+ quit = WScript.quit;
+ }
}
if (typeof readbuffer == 'undefined') {