summaryrefslogtreecommitdiff
path: root/monkey-test/ns-infrastructure
diff options
context:
space:
mode:
Diffstat (limited to 'monkey-test/ns-infrastructure')
-rw-r--r--monkey-test/ns-infrastructure/aborted-fetch.yaml23
-rw-r--r--monkey-test/ns-infrastructure/authentication-http.yaml27
-rw-r--r--monkey-test/ns-infrastructure/cookies.yaml65
-rw-r--r--monkey-test/ns-infrastructure/ecmascript.yaml40
-rw-r--r--monkey-test/ns-infrastructure/index.yaml14
-rw-r--r--monkey-test/ns-infrastructure/load-image-bmp.yaml21
-rw-r--r--monkey-test/ns-infrastructure/load-image-gif.yaml21
-rw-r--r--monkey-test/ns-infrastructure/load-image-ico.yaml21
-rw-r--r--monkey-test/ns-infrastructure/load-image-jpeg.yaml21
-rw-r--r--monkey-test/ns-infrastructure/load-image-png.yaml21
-rw-r--r--monkey-test/ns-infrastructure/load-trivial-document-https.yaml30
-rw-r--r--monkey-test/ns-infrastructure/load-trivial-document-with-png.yaml29
-rw-r--r--monkey-test/ns-infrastructure/load-trivial-document.yaml30
13 files changed, 363 insertions, 0 deletions
diff --git a/monkey-test/ns-infrastructure/aborted-fetch.yaml b/monkey-test/ns-infrastructure/aborted-fetch.yaml
new file mode 100644
index 0000000..90a2ee1
--- /dev/null
+++ b/monkey-test/ns-infrastructure/aborted-fetch.yaml
@@ -0,0 +1,23 @@
+title: Test we can hard-abort a fetch
+group: initial
+steps:
+- action: launch
+ language: en
+ options:
+ - enable_javascript=1
+- action: window-new
+ tag: win1
+
+# Ensure we can load the page properly in the first place
+- action: navigate
+ window: win1
+ url: http://test.netsurf-browser.org/cgi-bin/sleep.cgi
+# Wait a full three seconds for the page to start loading properly
+- action: sleep-ms
+ time: 3000
+ conditions: []
+# Now stop dead and hope we don't see anything bad in the logs
+- action: window-close
+ window: win1
+- action: quit
+
diff --git a/monkey-test/ns-infrastructure/authentication-http.yaml b/monkey-test/ns-infrastructure/authentication-http.yaml
new file mode 100644
index 0000000..cd15397
--- /dev/null
+++ b/monkey-test/ns-infrastructure/authentication-http.yaml
@@ -0,0 +1,27 @@
+title: Test the 401 login functionality
+group: http-auth
+steps:
+- action: launch
+ language: en
+- action: window-new
+ tag: win1
+- action: add-auth
+ url: http://test.netsurf-browser.org/cgi-bin/auth.cgi?user=foo&pass=bar
+ realm: Fake Realm
+ username: foo
+ password: bar
+- action: navigate
+ window: win1
+ url: http://test.netsurf-browser.org/cgi-bin/auth.cgi?user=foo&pass=bar
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - text-contains: "result=GOOD"
+- action: window-close
+ window: win1
+- action: quit
+
diff --git a/monkey-test/ns-infrastructure/cookies.yaml b/monkey-test/ns-infrastructure/cookies.yaml
new file mode 100644
index 0000000..76bf721
--- /dev/null
+++ b/monkey-test/ns-infrastructure/cookies.yaml
@@ -0,0 +1,65 @@
+title: Test ecmascript cookies behaviour
+group: ecmascript
+steps:
+- action: launch
+ language: en
+ options:
+ - enable_javascript=1
+- action: window-new
+ tag: win1
+
+# Ensure we can load the page properly in the first place
+- action: navigate
+ window: win1
+ url: https://test.netsurf-browser.org/cgi-bin/cookies.cgi
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - text-contains: "JSON: 0"
+
+
+# Now check that refreshing has incremented the counter
+- action: reload
+ window: win1
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - text-contains: "JSON: 1"
+
+# Now check that refreshing has incremented the counter
+- action: reload
+ window: win1
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - text-contains: "JSON: 2"
+
+# Now check that using http rather than https resets the counter
+- action: navigate
+ window: win1
+ url: http://test.netsurf-browser.org/cgi-bin/cookies.cgi
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - text-contains: "JSON: 0"
+
+- action: window-close
+ window: win1
+- action: quit
+
diff --git a/monkey-test/ns-infrastructure/ecmascript.yaml b/monkey-test/ns-infrastructure/ecmascript.yaml
new file mode 100644
index 0000000..82ec892
--- /dev/null
+++ b/monkey-test/ns-infrastructure/ecmascript.yaml
@@ -0,0 +1,40 @@
+title: Test ecmascript behaviour
+group: ecmascript
+steps:
+- action: launch
+ language: en
+ options:
+ - enable_javascript=1
+- 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/ns-infrastructure/index.yaml b/monkey-test/ns-infrastructure/index.yaml
new file mode 100644
index 0000000..397629f
--- /dev/null
+++ b/monkey-test/ns-infrastructure/index.yaml
@@ -0,0 +1,14 @@
+- group: initial
+ description: Basic checks that the browser can start and stop
+
+- group: no-networking
+ description: Tests that require no networking
+
+- group: basic
+ description: Basic tests that fetch from the test server
+
+- group: http-auth
+ description: Test HTTP 401 authentication
+
+- group: ecmascript
+ description: ECMAScript tests
diff --git a/monkey-test/ns-infrastructure/load-image-bmp.yaml b/monkey-test/ns-infrastructure/load-image-bmp.yaml
new file mode 100644
index 0000000..f204049
--- /dev/null
+++ b/monkey-test/ns-infrastructure/load-image-bmp.yaml
@@ -0,0 +1,21 @@
+title: load a bmp file
+group: basic
+steps:
+- action: launch
+ language: en
+- action: window-new
+ tag: win1
+- action: navigate
+ window: win1
+ url: https://test.netsurf-browser.org/cgi-bin/image.cgi?format=bmp&width=40&height=30
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - bitmap-count: 1
+- action: window-close
+ window: win1
+- action: quit \ No newline at end of file
diff --git a/monkey-test/ns-infrastructure/load-image-gif.yaml b/monkey-test/ns-infrastructure/load-image-gif.yaml
new file mode 100644
index 0000000..d84e8ad
--- /dev/null
+++ b/monkey-test/ns-infrastructure/load-image-gif.yaml
@@ -0,0 +1,21 @@
+title: load a gif file
+group: basic
+steps:
+- action: launch
+ language: en
+- action: window-new
+ tag: win1
+- action: navigate
+ window: win1
+ url: https://test.netsurf-browser.org/cgi-bin/image.cgi?format=gif&width=40&height=30
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - bitmap-count: 1
+- action: window-close
+ window: win1
+- action: quit \ No newline at end of file
diff --git a/monkey-test/ns-infrastructure/load-image-ico.yaml b/monkey-test/ns-infrastructure/load-image-ico.yaml
new file mode 100644
index 0000000..514a905
--- /dev/null
+++ b/monkey-test/ns-infrastructure/load-image-ico.yaml
@@ -0,0 +1,21 @@
+title: load a ico file
+group: disabled
+steps:
+- action: launch
+ language: en
+- action: window-new
+ tag: win1
+- action: navigate
+ window: win1
+ url: https://test.netsurf-browser.org/cgi-bin/image.cgi?format=ico&width=40&height=30
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - bitmap-count: 1
+- action: window-close
+ window: win1
+- action: quit \ No newline at end of file
diff --git a/monkey-test/ns-infrastructure/load-image-jpeg.yaml b/monkey-test/ns-infrastructure/load-image-jpeg.yaml
new file mode 100644
index 0000000..8e405d3
--- /dev/null
+++ b/monkey-test/ns-infrastructure/load-image-jpeg.yaml
@@ -0,0 +1,21 @@
+title: load a jpeg file
+group: basic
+steps:
+- action: launch
+ language: en
+- action: window-new
+ tag: win1
+- action: navigate
+ window: win1
+ url: https://test.netsurf-browser.org/cgi-bin/image.cgi?format=jpeg&width=40&height=30
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - bitmap-count: 1
+- action: window-close
+ window: win1
+- action: quit \ No newline at end of file
diff --git a/monkey-test/ns-infrastructure/load-image-png.yaml b/monkey-test/ns-infrastructure/load-image-png.yaml
new file mode 100644
index 0000000..5089c77
--- /dev/null
+++ b/monkey-test/ns-infrastructure/load-image-png.yaml
@@ -0,0 +1,21 @@
+title: load a png file
+group: basic
+steps:
+- action: launch
+ language: en
+- action: window-new
+ tag: win1
+- action: navigate
+ window: win1
+ url: https://test.netsurf-browser.org/cgi-bin/image.cgi?format=png&width=40&height=30
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - bitmap-count: 1
+- action: window-close
+ window: win1
+- action: quit \ No newline at end of file
diff --git a/monkey-test/ns-infrastructure/load-trivial-document-https.yaml b/monkey-test/ns-infrastructure/load-trivial-document-https.yaml
new file mode 100644
index 0000000..f80dd80
--- /dev/null
+++ b/monkey-test/ns-infrastructure/load-trivial-document-https.yaml
@@ -0,0 +1,30 @@
+title: load trivial document over https
+group: basic
+steps:
+- action: launch
+ language: en
+- action: window-new
+ tag: win1
+- action: navigate
+ window: win1
+ url: https://test.netsurf-browser.org/html/trivial-document.html
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - bitmap-count: 0
+ - text-contains: Trivial document
+ - text-contains: Hello!
+- action: navigate
+ window: win1
+ url: resource:netsurf.png
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: window-close
+ window: win1
+- action: quit \ No newline at end of file
diff --git a/monkey-test/ns-infrastructure/load-trivial-document-with-png.yaml b/monkey-test/ns-infrastructure/load-trivial-document-with-png.yaml
new file mode 100644
index 0000000..2dd375d
--- /dev/null
+++ b/monkey-test/ns-infrastructure/load-trivial-document-with-png.yaml
@@ -0,0 +1,29 @@
+title: load trivial document with png
+group: basic
+steps:
+- action: launch
+ language: en
+- action: window-new
+ tag: win1
+- action: navigate
+ window: win1
+ url: http://test.netsurf-browser.org/html/trivial-document-with-png.html
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - text-contains: Trivial document with PNG
+ - bitmap-count: 1
+- action: navigate
+ window: win1
+ url: resource:netsurf.png
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: window-close
+ window: win1
+- action: quit \ No newline at end of file
diff --git a/monkey-test/ns-infrastructure/load-trivial-document.yaml b/monkey-test/ns-infrastructure/load-trivial-document.yaml
new file mode 100644
index 0000000..ab6803e
--- /dev/null
+++ b/monkey-test/ns-infrastructure/load-trivial-document.yaml
@@ -0,0 +1,30 @@
+title: load trivial document
+group: basic
+steps:
+- action: launch
+ language: en
+- action: window-new
+ tag: win1
+- action: navigate
+ window: win1
+ url: http://test.netsurf-browser.org/html/trivial-document.html
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - bitmap-count: 0
+ - text-contains: Trivial document
+ - text-contains: Hello!
+- action: navigate
+ window: win1
+ url: resource:netsurf.png
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: window-close
+ window: win1
+- action: quit \ No newline at end of file