From 228eacf83d469994e4c4250a27d55f9a213234ed Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 1 Jul 2019 22:12:19 +0100 Subject: add initial ecmascript tests --- html/ecmascript-isfinite.html | 37 +++++++++++++++++++++++++++++++++++++ html/ecmascript-isinteger.html | 36 ++++++++++++++++++++++++++++++++++++ monkey-test/ecmascript.yaml | 38 ++++++++++++++++++++++++++++++++++++++ monkey-test/index.yaml | 3 +++ 4 files changed, 114 insertions(+) create mode 100644 html/ecmascript-isfinite.html create mode 100644 html/ecmascript-isinteger.html create mode 100644 monkey-test/ecmascript.yaml diff --git a/html/ecmascript-isfinite.html b/html/ecmascript-isfinite.html new file mode 100644 index 0000000..6941c5d --- /dev/null +++ b/html/ecmascript-isfinite.html @@ -0,0 +1,37 @@ + + + +test ecmascript Number.isFinite() + + +

test ecmascript Number.isFinite()

+ + + + + + diff --git a/html/ecmascript-isinteger.html b/html/ecmascript-isinteger.html new file mode 100644 index 0000000..0ca417f --- /dev/null +++ b/html/ecmascript-isinteger.html @@ -0,0 +1,36 @@ + + + +test ecmascript Number.isInteger() + + +

test ecmascript Number.isInteger()

+ + + + + + diff --git a/monkey-test/ecmascript.yaml b/monkey-test/ecmascript.yaml new file mode 100644 index 0000000..a08c9ce --- /dev/null +++ b/monkey-test/ecmascript.yaml @@ -0,0 +1,38 @@ +title: Test ecmascript behaviour +group: ecmascript +steps: +- action: launch + language: en +- action: window-new + tag: win1 + +# ensure isfinite works and is in both number and global context +- action: navigate + window: win1 + url: http://test.netsurf-browser.org/html/ecmascript-isfinite.html +- action: block + conditions: + - window: win1 + status: complete +- action: plot-check + window: win1 + checks: + - text-contains: "YESNOYESNO" + +# ensure isinteger works and is only in number context and not global +- action: navigate + window: win1 + url: http://test.netsurf-browser.org/html/ecmascript-isinteger.html +- action: block + conditions: + - window: win1 + status: complete +- action: plot-check + window: win1 + checks: + - text-contains: "YESNOReferenceError" + +- action: window-close + window: win1 +- action: quit + diff --git a/monkey-test/index.yaml b/monkey-test/index.yaml index df10dbc..f23d69c 100644 --- a/monkey-test/index.yaml +++ b/monkey-test/index.yaml @@ -13,5 +13,8 @@ - group: https description: Test HTTPS handling +- group: ecmascript + description: ECMAScript tests + - group: popular-sites description: Navigate popular web sites \ No newline at end of file -- cgit v1.2.3