From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../tests/workers/semantics/xhr/001-1.xml | 1 + .../tests/workers/semantics/xhr/001.html | 16 ++++++++++++++++ .../web-platform/tests/workers/semantics/xhr/001.js | 13 +++++++++++++ .../tests/workers/semantics/xhr/002.html | 16 ++++++++++++++++ .../web-platform/tests/workers/semantics/xhr/002.js | 9 +++++++++ .../tests/workers/semantics/xhr/003.html | 16 ++++++++++++++++ .../web-platform/tests/workers/semantics/xhr/003.js | 17 +++++++++++++++++ .../tests/workers/semantics/xhr/004.html | 16 ++++++++++++++++ .../web-platform/tests/workers/semantics/xhr/004.js | 11 +++++++++++ .../tests/workers/semantics/xhr/005.html | 21 +++++++++++++++++++++ .../tests/workers/semantics/xhr/006.html | 21 +++++++++++++++++++++ .../tests/workers/semantics/xhr/support/001-1.xml | 1 + .../tests/workers/semantics/xhr/support/005-1.js | 5 +++++ .../tests/workers/semantics/xhr/support/006-1.js | 7 +++++++ 14 files changed, 170 insertions(+) create mode 100644 testing/web-platform/tests/workers/semantics/xhr/001-1.xml create mode 100644 testing/web-platform/tests/workers/semantics/xhr/001.html create mode 100644 testing/web-platform/tests/workers/semantics/xhr/001.js create mode 100644 testing/web-platform/tests/workers/semantics/xhr/002.html create mode 100644 testing/web-platform/tests/workers/semantics/xhr/002.js create mode 100644 testing/web-platform/tests/workers/semantics/xhr/003.html create mode 100644 testing/web-platform/tests/workers/semantics/xhr/003.js create mode 100644 testing/web-platform/tests/workers/semantics/xhr/004.html create mode 100644 testing/web-platform/tests/workers/semantics/xhr/004.js create mode 100644 testing/web-platform/tests/workers/semantics/xhr/005.html create mode 100644 testing/web-platform/tests/workers/semantics/xhr/006.html create mode 100644 testing/web-platform/tests/workers/semantics/xhr/support/001-1.xml create mode 100644 testing/web-platform/tests/workers/semantics/xhr/support/005-1.js create mode 100644 testing/web-platform/tests/workers/semantics/xhr/support/006-1.js (limited to 'testing/web-platform/tests/workers/semantics/xhr') diff --git a/testing/web-platform/tests/workers/semantics/xhr/001-1.xml b/testing/web-platform/tests/workers/semantics/xhr/001-1.xml new file mode 100644 index 0000000000..5d735bdf61 --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/001-1.xml @@ -0,0 +1 @@ +foo \ No newline at end of file diff --git a/testing/web-platform/tests/workers/semantics/xhr/001.html b/testing/web-platform/tests/workers/semantics/xhr/001.html new file mode 100644 index 0000000000..da59f5ac2d --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/001.html @@ -0,0 +1,16 @@ + +async XMLHttpRequest in dedicated worker + + +
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/workers/semantics/xhr/001.js b/testing/web-platform/tests/workers/semantics/xhr/001.js new file mode 100644 index 0000000000..1cbe98ba47 --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/001.js @@ -0,0 +1,13 @@ +var xhr = new XMLHttpRequest(); +var log = ''; +xhr.onreadystatechange = function(e) { + if (this.readyState == 4) { + if (this.responseXML != null) + log += 'responseXML was not null. '; + if (this.responseText != 'foo') + log += 'responseText was ' + this.responseText + ', expected foo. '; + postMessage(log); + } +} +xhr.open('GET', '001-1.xml', true); +xhr.send(); \ No newline at end of file diff --git a/testing/web-platform/tests/workers/semantics/xhr/002.html b/testing/web-platform/tests/workers/semantics/xhr/002.html new file mode 100644 index 0000000000..60c0e161cc --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/002.html @@ -0,0 +1,16 @@ + +sync XMLHttpRequest in dedicated worker + + +
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/workers/semantics/xhr/002.js b/testing/web-platform/tests/workers/semantics/xhr/002.js new file mode 100644 index 0000000000..68d7e91d45 --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/002.js @@ -0,0 +1,9 @@ +var xhr = new XMLHttpRequest(); +var log = ''; +xhr.open('GET', '001-1.xml', false); +xhr.send(); +if (xhr.responseXML != null) + log += 'responseXML was not null. '; +if (xhr.responseText != 'foo') + log += 'responseText was ' + this.responseText + ', expected foo. '; +postMessage(log); \ No newline at end of file diff --git a/testing/web-platform/tests/workers/semantics/xhr/003.html b/testing/web-platform/tests/workers/semantics/xhr/003.html new file mode 100644 index 0000000000..e3ce36b82c --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/003.html @@ -0,0 +1,16 @@ + +async XMLHttpRequest in shared worker + + +
+ + diff --git a/testing/web-platform/tests/workers/semantics/xhr/003.js b/testing/web-platform/tests/workers/semantics/xhr/003.js new file mode 100644 index 0000000000..1a9c5a7ee8 --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/003.js @@ -0,0 +1,17 @@ +onconnect = function(e) { + var xhr = new XMLHttpRequest(); + var log = ''; + var port = e.ports[0]; + var postMessage = port.postMessage; + xhr.onreadystatechange = function(e) { + if (this.readyState == 4) { + if (this.responseXML != null) + log += 'responseXML was not null. '; + if (this.responseText && this.responseText != 'foo') + log += 'responseText was ' + this.responseText + ', expected foo. '; + postMessage.call(port, log); + } + } + xhr.open('GET', '001-1.xml', true); + xhr.send(); +} diff --git a/testing/web-platform/tests/workers/semantics/xhr/004.html b/testing/web-platform/tests/workers/semantics/xhr/004.html new file mode 100644 index 0000000000..d11e3dbc1b --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/004.html @@ -0,0 +1,16 @@ + +sync XMLHttpRequest in shared worker + + +
+ + diff --git a/testing/web-platform/tests/workers/semantics/xhr/004.js b/testing/web-platform/tests/workers/semantics/xhr/004.js new file mode 100644 index 0000000000..1741c8d36a --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/004.js @@ -0,0 +1,11 @@ +onconnect = function(e) { + var xhr = new XMLHttpRequest(); + var log = ''; + xhr.open('GET', '001-1.xml', false); + xhr.send(); + if (xhr.responseXML != null) + log += 'responseXML was not null. '; + if (xhr.responseText != 'foo') + log += 'responseText was ' + xhr.responseText + ', expected foo. '; + e.ports[0].postMessage(log); +} diff --git a/testing/web-platform/tests/workers/semantics/xhr/005.html b/testing/web-platform/tests/workers/semantics/xhr/005.html new file mode 100644 index 0000000000..84abdb0c42 --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/005.html @@ -0,0 +1,21 @@ + +base url, dedicated worker + + +
+ + + diff --git a/testing/web-platform/tests/workers/semantics/xhr/006.html b/testing/web-platform/tests/workers/semantics/xhr/006.html new file mode 100644 index 0000000000..7411b4baef --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/006.html @@ -0,0 +1,21 @@ + +base url, shared worker + + +
+ + + diff --git a/testing/web-platform/tests/workers/semantics/xhr/support/001-1.xml b/testing/web-platform/tests/workers/semantics/xhr/support/001-1.xml new file mode 100644 index 0000000000..ecea58a935 --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/support/001-1.xml @@ -0,0 +1 @@ +bar \ No newline at end of file diff --git a/testing/web-platform/tests/workers/semantics/xhr/support/005-1.js b/testing/web-platform/tests/workers/semantics/xhr/support/005-1.js new file mode 100644 index 0000000000..45f6519a21 --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/support/005-1.js @@ -0,0 +1,5 @@ +var xhr = new XMLHttpRequest(); +xhr.open('GET', '001-1.xml', false); +xhr.send(); +var passed = xhr.responseText == 'bar'; +postMessage(passed); \ No newline at end of file diff --git a/testing/web-platform/tests/workers/semantics/xhr/support/006-1.js b/testing/web-platform/tests/workers/semantics/xhr/support/006-1.js new file mode 100644 index 0000000000..d446781eb7 --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/xhr/support/006-1.js @@ -0,0 +1,7 @@ +onconnect = function(e) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', '001-1.xml', false); + xhr.send(); + var passed = xhr.responseText == 'bar'; + e.ports[0].postMessage(passed); +} \ No newline at end of file -- cgit v1.2.3