From 9e3c08db40b8916968b9f30096c7be3f00ce9647 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:44:51 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- netwerk/test/unit/test_bug376844.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 netwerk/test/unit/test_bug376844.js (limited to 'netwerk/test/unit/test_bug376844.js') diff --git a/netwerk/test/unit/test_bug376844.js b/netwerk/test/unit/test_bug376844.js new file mode 100644 index 0000000000..5184a30e54 --- /dev/null +++ b/netwerk/test/unit/test_bug376844.js @@ -0,0 +1,19 @@ +"use strict"; + +const testURLs = [ + ["http://example.com/<", "http://example.com/%3C"], + ["http://example.com/>", "http://example.com/%3E"], + ["http://example.com/'", "http://example.com/'"], + ['http://example.com/"', "http://example.com/%22"], + ["http://example.com/?<", "http://example.com/?%3C"], + ["http://example.com/?>", "http://example.com/?%3E"], + ["http://example.com/?'", "http://example.com/?%27"], + ['http://example.com/?"', "http://example.com/?%22"], +]; + +function run_test() { + for (var i = 0; i < testURLs.length; i++) { + var uri = Services.io.newURI(testURLs[i][0]); + Assert.equal(uri.spec, testURLs[i][1]); + } +} -- cgit v1.2.3