From ac82585ae7064b7ecded4e6d2c417b37bd21dfbd Mon Sep 17 00:00:00 2001 From: Kenneth Myhra Date: Sat, 25 Nov 2023 14:27:30 +0100 Subject: [PATCH] Tests/LibWeb: Verify XHR.send() throws when XHR.readyState is UNSENT This verifies that an Invalid State Error is being thrown when XHR.open() has not been called before calling XHR::send(). --- .../XHR/XMLHttpRequest-state-not-opened.txt | 1 + .../input/XHR/XMLHttpRequest-state-not-opened.html | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 Tests/LibWeb/Text/expected/XHR/XMLHttpRequest-state-not-opened.txt create mode 100644 Tests/LibWeb/Text/input/XHR/XMLHttpRequest-state-not-opened.html diff --git a/Tests/LibWeb/Text/expected/XHR/XMLHttpRequest-state-not-opened.txt b/Tests/LibWeb/Text/expected/XHR/XMLHttpRequest-state-not-opened.txt new file mode 100644 index 00000000000..7ef22e9a431 --- /dev/null +++ b/Tests/LibWeb/Text/expected/XHR/XMLHttpRequest-state-not-opened.txt @@ -0,0 +1 @@ +PASS diff --git a/Tests/LibWeb/Text/input/XHR/XMLHttpRequest-state-not-opened.html b/Tests/LibWeb/Text/input/XHR/XMLHttpRequest-state-not-opened.html new file mode 100644 index 00000000000..3008c44dc9d --- /dev/null +++ b/Tests/LibWeb/Text/input/XHR/XMLHttpRequest-state-not-opened.html @@ -0,0 +1,14 @@ + +