summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-21 18:09:31 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-21 18:09:31 +0000
commite3c906a74dc846966b107dc35512b9ff06ba29c0 (patch)
treebc25a3ee331f75e5e281ac51a18d9bad4e88111e
parent5d6ae00155ab3af3b05f9c6a6c687861a5dc4293 (diff)
downloadnetsurf-test-e3c906a74dc846966b107dc35512b9ff06ba29c0.tar.gz
netsurf-test-e3c906a74dc846966b107dc35512b9ff06ba29c0.tar.bz2
Monkey: Add innerHTML test
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r--html/inner.html14
-rw-r--r--monkey-test/ns-infrastructure/ecmascript.yaml13
2 files changed, 27 insertions, 0 deletions
diff --git a/html/inner.html b/html/inner.html
new file mode 100644
index 0000000..7d12319
--- /dev/null
+++ b/html/inner.html
@@ -0,0 +1,14 @@
+<html><head><title>Inner</title>
+
+ <style>
+ h1 { visibility: hidden; }
+ div#magic > h1 { visibility: visible; }
+ </style>
+ </head>
+ <body>
+ <div id="magic"></div>
+ </body>
+ <script>
+ document.getElementById("magic").innerHTML = "<h1>innerHTML worked</h1>";
+ </script>
+</html>
diff --git a/monkey-test/ns-infrastructure/ecmascript.yaml b/monkey-test/ns-infrastructure/ecmascript.yaml
index 82ec892..feb023e 100644
--- a/monkey-test/ns-infrastructure/ecmascript.yaml
+++ b/monkey-test/ns-infrastructure/ecmascript.yaml
@@ -34,6 +34,19 @@ steps:
checks:
- text-contains: "YESNOReferenceError"
+# ensure innerHTML works
+- action: navigate
+ window: win1
+ url: http://test.netsurf-browser.org/html/inner.html
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - text-contains: "innerHTML worked"
+
- action: window-close
window: win1
- action: quit