From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- dom/worklet/tests/common.js | 14 +++++++ dom/worklet/tests/file_basic.html | 57 ++++++++++++++++++++++++++ dom/worklet/tests/file_console.html | 19 +++++++++ dom/worklet/tests/file_dump.html | 22 ++++++++++ dom/worklet/tests/file_import_with_cache.html | 43 +++++++++++++++++++ dom/worklet/tests/mochitest.ini | 13 ++++++ dom/worklet/tests/server_import_with_cache.sjs | 13 ++++++ dom/worklet/tests/test_basic.html | 21 ++++++++++ dom/worklet/tests/test_console.html | 42 +++++++++++++++++++ dom/worklet/tests/test_dump.html | 21 ++++++++++ dom/worklet/tests/test_import_with_cache.html | 21 ++++++++++ dom/worklet/tests/worklet_console.js | 1 + dom/worklet/tests/worklet_dump.js | 1 + 13 files changed, 288 insertions(+) create mode 100644 dom/worklet/tests/common.js create mode 100644 dom/worklet/tests/file_basic.html create mode 100644 dom/worklet/tests/file_console.html create mode 100644 dom/worklet/tests/file_dump.html create mode 100644 dom/worklet/tests/file_import_with_cache.html create mode 100644 dom/worklet/tests/mochitest.ini create mode 100644 dom/worklet/tests/server_import_with_cache.sjs create mode 100644 dom/worklet/tests/test_basic.html create mode 100644 dom/worklet/tests/test_console.html create mode 100644 dom/worklet/tests/test_dump.html create mode 100644 dom/worklet/tests/test_import_with_cache.html create mode 100644 dom/worklet/tests/worklet_console.js create mode 100644 dom/worklet/tests/worklet_dump.js (limited to 'dom/worklet/tests') diff --git a/dom/worklet/tests/common.js b/dom/worklet/tests/common.js new file mode 100644 index 000000000..9d70f6aa7 --- /dev/null +++ b/dom/worklet/tests/common.js @@ -0,0 +1,14 @@ +function loadTest(file) { + var iframe = document.createElement('iframe'); + iframe.src = file; + + document.body.appendChild(iframe); +} + +function setupTest() { + window.SimpleTest = parent.SimpleTest; + window.is = parent.is; + window.isnot = parent.isnot; + window.ok = parent.ok; + window.info = parent.info; +} diff --git a/dom/worklet/tests/file_basic.html b/dom/worklet/tests/file_basic.html new file mode 100644 index 000000000..ef60ee27f --- /dev/null +++ b/dom/worklet/tests/file_basic.html @@ -0,0 +1,57 @@ + + + + Test for Worklet + + + + + + + diff --git a/dom/worklet/tests/file_console.html b/dom/worklet/tests/file_console.html new file mode 100644 index 000000000..c4a71e172 --- /dev/null +++ b/dom/worklet/tests/file_console.html @@ -0,0 +1,19 @@ + + + + Test for Worklet + + + + + + + diff --git a/dom/worklet/tests/file_dump.html b/dom/worklet/tests/file_dump.html new file mode 100644 index 000000000..123a625a9 --- /dev/null +++ b/dom/worklet/tests/file_dump.html @@ -0,0 +1,22 @@ + + + + Test for Worklet + + + + + + + diff --git a/dom/worklet/tests/file_import_with_cache.html b/dom/worklet/tests/file_import_with_cache.html new file mode 100644 index 000000000..e98818d6f --- /dev/null +++ b/dom/worklet/tests/file_import_with_cache.html @@ -0,0 +1,43 @@ + + + + Test for Worklet + + + + + + + diff --git a/dom/worklet/tests/mochitest.ini b/dom/worklet/tests/mochitest.ini new file mode 100644 index 000000000..2194361cc --- /dev/null +++ b/dom/worklet/tests/mochitest.ini @@ -0,0 +1,13 @@ +[DEFAULT] +skip-if = release_or_beta +support-files = + common.js + +[test_basic.html] +support-files=file_basic.html +[test_console.html] +support-files=file_console.html worklet_console.js +[test_import_with_cache.html] +support-files=file_import_with_cache.html server_import_with_cache.sjs +[test_dump.html] +support-files=file_dump.html worklet_dump.js diff --git a/dom/worklet/tests/server_import_with_cache.sjs b/dom/worklet/tests/server_import_with_cache.sjs new file mode 100644 index 000000000..79a934dd3 --- /dev/null +++ b/dom/worklet/tests/server_import_with_cache.sjs @@ -0,0 +1,13 @@ +function handleRequest(request, response) +{ + response.setHeader("Content-Type", "text/javascript", false); + + var state = getState("alreadySent"); + if (!state) { + setState("alreadySent", "1"); + } else { + response.setStatusLine('1.1', 404, "Not Found"); + } + + response.write("42"); +} diff --git a/dom/worklet/tests/test_basic.html b/dom/worklet/tests/test_basic.html new file mode 100644 index 000000000..b3010d1a5 --- /dev/null +++ b/dom/worklet/tests/test_basic.html @@ -0,0 +1,21 @@ + + + + Test for Worklet + + + + + + + + + diff --git a/dom/worklet/tests/test_console.html b/dom/worklet/tests/test_console.html new file mode 100644 index 000000000..72a667389 --- /dev/null +++ b/dom/worklet/tests/test_console.html @@ -0,0 +1,42 @@ + + + + Test for Worklet - Console + + + + + + + + + diff --git a/dom/worklet/tests/test_dump.html b/dom/worklet/tests/test_dump.html new file mode 100644 index 000000000..011e6d498 --- /dev/null +++ b/dom/worklet/tests/test_dump.html @@ -0,0 +1,21 @@ + + + + Test for Worklet - Console + + + + + + + + + diff --git a/dom/worklet/tests/test_import_with_cache.html b/dom/worklet/tests/test_import_with_cache.html new file mode 100644 index 000000000..316f914eb --- /dev/null +++ b/dom/worklet/tests/test_import_with_cache.html @@ -0,0 +1,21 @@ + + + + Test for Worklet + + + + + + + + + diff --git a/dom/worklet/tests/worklet_console.js b/dom/worklet/tests/worklet_console.js new file mode 100644 index 000000000..557beb1af --- /dev/null +++ b/dom/worklet/tests/worklet_console.js @@ -0,0 +1 @@ +console.log("Hello world from a worklet"); diff --git a/dom/worklet/tests/worklet_dump.js b/dom/worklet/tests/worklet_dump.js new file mode 100644 index 000000000..439d13f70 --- /dev/null +++ b/dom/worklet/tests/worklet_dump.js @@ -0,0 +1 @@ +dump("Hello world from a worklet"); -- cgit v1.2.3