summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/tools/wave/www/submitresult.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/tools/wave/www/submitresult.html
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/tools/wave/www/submitresult.html')
-rw-r--r--testing/web-platform/tests/tools/wave/www/submitresult.html63
1 files changed, 63 insertions, 0 deletions
diff --git a/testing/web-platform/tests/tools/wave/www/submitresult.html b/testing/web-platform/tests/tools/wave/www/submitresult.html
new file mode 100644
index 0000000000..07e9f35235
--- /dev/null
+++ b/testing/web-platform/tests/tools/wave/www/submitresult.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <title>Web Platform Tests</title>
+ <style>
+ #console {
+ font-family: monospace;
+ }
+ </style>
+ <script src="lib/wave-service.js"></script>
+ </head>
+ <body>
+ <div id="console"></div>
+ <script>
+ var screenConsole = document.getElementById("console");
+ var log = function() {
+ var text = "";
+ for (var i = 0; i < arguments.length; i++) {
+ text += arguments[i] + " ";
+ }
+ text = text.replace(/ /gm, "&nbsp;");
+ text = text.replace(/\n/gm, "<br/>");
+ screenConsole.innerHTML += "<br/>" + text;
+ };
+
+ window.onerror = function(error) {
+ log(error);
+ };
+
+ var HOSTNAME = location.hostname;
+ var PORT = location.port;
+ var PROTOCOL = location.protocol.replace(/:/, "");
+ var QUERY = (location.search.replace(/\?/, ""));
+ var match = QUERY.match(/token=([^&]+)/);
+ var TOKEN = match ? match[1] : null;
+ QUERY += /[\?&]path=/.test(location.search) ? "" : "&resume=1";
+ match = QUERY.match(/data=([^&]+)/);
+
+ var parsedQuery = {};
+
+ var parts = QUERY.split("&");
+ for (var i = 0; i < parts.length; i++) {
+ var part = parts[i];
+ var key = part.split("=")[0];
+ var value = part.split("=")[1];
+ parsedQuery[key] = value;
+ }
+
+ var resultData;
+ var rawResult = parsedQuery.result;
+ if (rawResult) {
+ resultData = JSON.parse(decodeURIComponent(rawResult));
+ }
+
+ WaveService.createResult(TOKEN, resultData, function() {
+ WaveService.readNextTest(TOKEN, function(url) {
+ location.href = url;
+ });
+ });
+ </script>
+ </body>
+</html>