From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- dom/tests/mochitest/whatwg/chrome.toml | 3 + dom/tests/mochitest/whatwg/file_bug500328_1.html | 51 ++ dom/tests/mochitest/whatwg/file_bug500328_2.html | 17 + .../whatwg/file_structuredCloneAndExposed.sjs | 22 + dom/tests/mochitest/whatwg/mochitest.toml | 122 ++++ .../whatwg/postMessage_chrome_helper.html | 49 ++ .../whatwg/postMessage_closed_helper.html | 26 + dom/tests/mochitest/whatwg/postMessage_hash.html | 31 + dom/tests/mochitest/whatwg/postMessage_helper.html | 102 +++ .../mochitest/whatwg/postMessage_idn_helper.html | 41 ++ .../whatwg/postMessage_joined_helper.html | 85 +++ .../whatwg/postMessage_joined_helper2.html | 71 ++ .../mochitest/whatwg/postMessage_onOther.html | 109 +++ .../whatwg/postMessage_origin_helper.xhtml | 42 ++ .../whatwg/postMessage_override_helper.html | 37 + .../postMessage_structured_clone_helper.html | 106 +++ .../whatwg/postMessage_structured_clone_helper.js | 62 ++ .../mochitest/whatwg/postMessage_throw_helper.html | 24 + .../whatwg/postMessage_transfer_helper.html | 15 + .../whatwg/postMessage_userpass_helper.html | 34 + dom/tests/mochitest/whatwg/test_MessageEvent.html | 102 +++ .../whatwg/test_MessageEvent_dispatchToOther.html | 59 ++ dom/tests/mochitest/whatwg/test_bug477323.html | 64 ++ dom/tests/mochitest/whatwg/test_bug500328.html | 769 +++++++++++++++++++++ .../mochitest/whatwg/test_document_scripts.html | 55 ++ dom/tests/mochitest/whatwg/test_postMessage.html | 161 +++++ .../whatwg/test_postMessage_basehref.html | 45 ++ .../mochitest/whatwg/test_postMessage_chrome.html | 114 +++ .../mochitest/whatwg/test_postMessage_closed.html | 77 +++ .../mochitest/whatwg/test_postMessage_hash.html | 44 ++ .../mochitest/whatwg/test_postMessage_idn.xhtml | 66 ++ .../mochitest/whatwg/test_postMessage_joined.html | 53 ++ .../mochitest/whatwg/test_postMessage_onOther.html | 51 ++ .../mochitest/whatwg/test_postMessage_origin.xhtml | 465 +++++++++++++ .../whatwg/test_postMessage_override.html | 47 ++ .../whatwg/test_postMessage_special.xhtml | 304 ++++++++ .../whatwg/test_postMessage_structured_clone.html | 70 ++ .../mochitest/whatwg/test_postMessage_throw.html | 74 ++ .../whatwg/test_postMessage_transfer.html | 61 ++ .../whatwg/test_postMessage_userpass.html | 46 ++ .../whatwg/test_structuredCloneAndExposed.html | 307 ++++++++ 41 files changed, 4083 insertions(+) create mode 100644 dom/tests/mochitest/whatwg/chrome.toml create mode 100644 dom/tests/mochitest/whatwg/file_bug500328_1.html create mode 100644 dom/tests/mochitest/whatwg/file_bug500328_2.html create mode 100644 dom/tests/mochitest/whatwg/file_structuredCloneAndExposed.sjs create mode 100644 dom/tests/mochitest/whatwg/mochitest.toml create mode 100644 dom/tests/mochitest/whatwg/postMessage_chrome_helper.html create mode 100644 dom/tests/mochitest/whatwg/postMessage_closed_helper.html create mode 100644 dom/tests/mochitest/whatwg/postMessage_hash.html create mode 100644 dom/tests/mochitest/whatwg/postMessage_helper.html create mode 100644 dom/tests/mochitest/whatwg/postMessage_idn_helper.html create mode 100644 dom/tests/mochitest/whatwg/postMessage_joined_helper.html create mode 100644 dom/tests/mochitest/whatwg/postMessage_joined_helper2.html create mode 100644 dom/tests/mochitest/whatwg/postMessage_onOther.html create mode 100644 dom/tests/mochitest/whatwg/postMessage_origin_helper.xhtml create mode 100644 dom/tests/mochitest/whatwg/postMessage_override_helper.html create mode 100644 dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.html create mode 100644 dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.js create mode 100644 dom/tests/mochitest/whatwg/postMessage_throw_helper.html create mode 100644 dom/tests/mochitest/whatwg/postMessage_transfer_helper.html create mode 100644 dom/tests/mochitest/whatwg/postMessage_userpass_helper.html create mode 100644 dom/tests/mochitest/whatwg/test_MessageEvent.html create mode 100644 dom/tests/mochitest/whatwg/test_MessageEvent_dispatchToOther.html create mode 100644 dom/tests/mochitest/whatwg/test_bug477323.html create mode 100644 dom/tests/mochitest/whatwg/test_bug500328.html create mode 100644 dom/tests/mochitest/whatwg/test_document_scripts.html create mode 100644 dom/tests/mochitest/whatwg/test_postMessage.html create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_basehref.html create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_chrome.html create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_closed.html create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_hash.html create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_idn.xhtml create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_joined.html create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_onOther.html create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_origin.xhtml create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_override.html create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_special.xhtml create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_structured_clone.html create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_throw.html create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_transfer.html create mode 100644 dom/tests/mochitest/whatwg/test_postMessage_userpass.html create mode 100644 dom/tests/mochitest/whatwg/test_structuredCloneAndExposed.html (limited to 'dom/tests/mochitest/whatwg') diff --git a/dom/tests/mochitest/whatwg/chrome.toml b/dom/tests/mochitest/whatwg/chrome.toml new file mode 100644 index 0000000000..9ec68ac282 --- /dev/null +++ b/dom/tests/mochitest/whatwg/chrome.toml @@ -0,0 +1,3 @@ +[DEFAULT] + +["test_postMessage_chrome.html"] diff --git a/dom/tests/mochitest/whatwg/file_bug500328_1.html b/dom/tests/mochitest/whatwg/file_bug500328_1.html new file mode 100644 index 0000000000..941cb47c55 --- /dev/null +++ b/dom/tests/mochitest/whatwg/file_bug500328_1.html @@ -0,0 +1,51 @@ + + + + +test 1 + + + + + +Link Anchor1 +Self + + diff --git a/dom/tests/mochitest/whatwg/file_bug500328_2.html b/dom/tests/mochitest/whatwg/file_bug500328_2.html new file mode 100644 index 0000000000..3ce66493dd --- /dev/null +++ b/dom/tests/mochitest/whatwg/file_bug500328_2.html @@ -0,0 +1,17 @@ + + + + + + + +file_bug500328_2.html + + diff --git a/dom/tests/mochitest/whatwg/file_structuredCloneAndExposed.sjs b/dom/tests/mochitest/whatwg/file_structuredCloneAndExposed.sjs new file mode 100644 index 0000000000..e352078e2a --- /dev/null +++ b/dom/tests/mochitest/whatwg/file_structuredCloneAndExposed.sjs @@ -0,0 +1,22 @@ +"use strict"; + +function handleRequest(request, response) { + let query = new URLSearchParams(request.queryString); + + response.setHeader("Content-Type", "application/javascript"); + + let content = `function installListeners(input, target) { + input.addEventListener("message", () => { + target.postMessage(true, { targetOrigin: "*" }); + }); + input.addEventListener("messageerror", () => { + target.postMessage(false, { targetOrigin: "*" }); + }); + target.postMessage("Inited", { targetOrigin: "*" }); + } + + ${query.get("additionalScript")} + `; + + response.write(content); +} diff --git a/dom/tests/mochitest/whatwg/mochitest.toml b/dom/tests/mochitest/whatwg/mochitest.toml new file mode 100644 index 0000000000..fd20629a9c --- /dev/null +++ b/dom/tests/mochitest/whatwg/mochitest.toml @@ -0,0 +1,122 @@ +[DEFAULT] +support-files = [ + "postMessage_chrome_helper.html", + "postMessage_closed_helper.html", + "postMessage_hash.html", + "postMessage_helper.html", + "postMessage_idn_helper.html", + "postMessage_joined_helper2.html", + "postMessage_joined_helper.html", + "postMessage_onOther.html", + "postMessage_origin_helper.xhtml", + "postMessage_override_helper.html", + "postMessage_structured_clone_helper.html", + "postMessage_structured_clone_helper.js", + "postMessage_throw_helper.html", + "postMessage_transfer_helper.html", + "postMessage_userpass_helper.html", +] + +["test_MessageEvent.html"] + +["test_MessageEvent_dispatchToOther.html"] +skip-if = [ + "http3", + "http2", +] + +["test_bug477323.html"] + +["test_bug500328.html"] +skip-if = ["true"] # bug 696306 +support-files = [ + "file_bug500328_1.html", + "file_bug500328_2.html", +] + +["test_document_scripts.html"] + +["test_postMessage.html"] +skip-if = [ + "http3", + "http2", +] + +["test_postMessage_basehref.html"] +skip-if = [ + "http3", + "http2", +] + +["test_postMessage_closed.html"] +skip-if = [ + "os == 'android'", #bug 894914 - wrong data - got FAIL, expected message + "http3", + "http2", +] + +["test_postMessage_hash.html"] +skip-if = [ + "http3", + "http2", +] + +["test_postMessage_idn.xhtml"] +skip-if = [ + "http3", + "http2", +] + +["test_postMessage_joined.html"] +skip-if = [ + "http3", + "http2", +] + +["test_postMessage_onOther.html"] +skip-if = [ + "http3", + "http2", +] + +["test_postMessage_origin.xhtml"] +skip-if = [ + "http3", + "http2", +] + +["test_postMessage_override.html"] +skip-if = [ + "http3", + "http2", +] + +["test_postMessage_special.xhtml"] +skip-if = [ + "http3", + "http2", +] + +["test_postMessage_structured_clone.html"] +skip-if = [ + "http3", + "http2", +] + +["test_postMessage_throw.html"] + +["test_postMessage_transfer.html"] +skip-if = [ + "http3", + "http2", +] + +["test_postMessage_userpass.html"] +skip-if = [ + "http3", + "http2", +] + +["test_structuredCloneAndExposed.html"] +scheme = "https" +support-files = ["file_structuredCloneAndExposed.sjs"] diff --git a/dom/tests/mochitest/whatwg/postMessage_chrome_helper.html b/dom/tests/mochitest/whatwg/postMessage_chrome_helper.html new file mode 100644 index 0000000000..eea07f538c --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_chrome_helper.html @@ -0,0 +1,49 @@ + + + + postMessage chrome message receiver + + + +

example.org

+ + diff --git a/dom/tests/mochitest/whatwg/postMessage_closed_helper.html b/dom/tests/mochitest/whatwg/postMessage_closed_helper.html new file mode 100644 index 0000000000..984ed08e71 --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_closed_helper.html @@ -0,0 +1,26 @@ + + + + postMessage closed page + + + + + diff --git a/dom/tests/mochitest/whatwg/postMessage_hash.html b/dom/tests/mochitest/whatwg/postMessage_hash.html new file mode 100644 index 0000000000..a7225153be --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_hash.html @@ -0,0 +1,31 @@ + + + + Hashed kid for test_postMessage_hash.html + + + +

Kid iframe

+ + diff --git a/dom/tests/mochitest/whatwg/postMessage_helper.html b/dom/tests/mochitest/whatwg/postMessage_helper.html new file mode 100644 index 0000000000..2d01214707 --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_helper.html @@ -0,0 +1,102 @@ + + + + postMessage message receiver + + + +

+ + diff --git a/dom/tests/mochitest/whatwg/postMessage_idn_helper.html b/dom/tests/mochitest/whatwg/postMessage_idn_helper.html new file mode 100644 index 0000000000..b401fd9933 --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_idn_helper.html @@ -0,0 +1,41 @@ + + + + postMessage IDN test page + + + +

No location!

+ + diff --git a/dom/tests/mochitest/whatwg/postMessage_joined_helper.html b/dom/tests/mochitest/whatwg/postMessage_joined_helper.html new file mode 100644 index 0000000000..aa40909017 --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_joined_helper.html @@ -0,0 +1,85 @@ + + + + + postMessage joined domains, inner frame + + + +

No location!

+ + + + + diff --git a/dom/tests/mochitest/whatwg/postMessage_joined_helper2.html b/dom/tests/mochitest/whatwg/postMessage_joined_helper2.html new file mode 100644 index 0000000000..0f6c063cc4 --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_joined_helper2.html @@ -0,0 +1,71 @@ + + + + + postMessage joined domains, innermost frame + + + +

No location!

+ + diff --git a/dom/tests/mochitest/whatwg/postMessage_onOther.html b/dom/tests/mochitest/whatwg/postMessage_onOther.html new file mode 100644 index 0000000000..9d60d9ef24 --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_onOther.html @@ -0,0 +1,109 @@ + + + + postMessage called through another frame + + + +

No location!

+ + diff --git a/dom/tests/mochitest/whatwg/postMessage_origin_helper.xhtml b/dom/tests/mochitest/whatwg/postMessage_origin_helper.xhtml new file mode 100644 index 0000000000..955b2de83f --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_origin_helper.xhtml @@ -0,0 +1,42 @@ + + + + postMessage origin-testing helper page + + + +

No location!

+ + diff --git a/dom/tests/mochitest/whatwg/postMessage_override_helper.html b/dom/tests/mochitest/whatwg/postMessage_override_helper.html new file mode 100644 index 0000000000..901e3af7bb --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_override_helper.html @@ -0,0 +1,37 @@ + + + + Overriding postMessage and dispatchEvent bindings + + + +

No location!

+ + diff --git a/dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.html b/dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.html new file mode 100644 index 0000000000..2b6e9d1f46 --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.html @@ -0,0 +1,106 @@ + + + + postMessage structured clone page + + + + + + diff --git a/dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.js b/dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.js new file mode 100644 index 0000000000..b457fd2d2f --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.js @@ -0,0 +1,62 @@ +function* getTestContent() { + yield "hello"; + yield 2 + 3; + yield 12; + yield null; + yield "complex" + "string"; + yield new Object(); + yield new Date(1306113544); + yield [1, 2, 3, 4, 5]; + let obj = new Object(); + obj.foo = 3; + obj.bar = "hi"; + obj.baz = new Date(1306113544); + obj.boo = obj; + yield obj; + + let recursiveobj = new Object(); + recursiveobj.a = recursiveobj; + recursiveobj.foo = new Object(); + recursiveobj.foo.bar = "bar"; + recursiveobj.foo.backref = recursiveobj; + recursiveobj.foo.baz = 84; + recursiveobj.foo.backref2 = recursiveobj; + recursiveobj.bar = new Object(); + recursiveobj.bar.foo = "foo"; + recursiveobj.bar.backref = recursiveobj; + recursiveobj.bar.baz = new Date(1306113544); + recursiveobj.bar.backref2 = recursiveobj; + recursiveobj.expando = recursiveobj; + yield recursiveobj; + + obj = new Object(); + obj.expando1 = 1; + obj.foo = new Object(); + obj.foo.bar = 2; + obj.bar = new Object(); + obj.bar.foo = obj.foo; + obj.expando = new Object(); + obj.expando.expando = new Object(); + obj.expando.expando.obj = obj; + obj.expando2 = 4; + obj.baz = obj.expando.expando; + obj.blah = obj.bar; + obj.foo.baz = obj.blah; + obj.foo.blah = obj.blah; + yield obj; + + let diamond = new Object(); + obj = new Object(); + obj.foo = "foo"; + obj.bar = 92; + obj.backref = diamond; + diamond.ref1 = obj; + diamond.ref2 = obj; + yield diamond; + + let doubleref = new Object(); + obj = new Object(); + doubleref.ref1 = obj; + doubleref.ref2 = obj; + yield doubleref; +} diff --git a/dom/tests/mochitest/whatwg/postMessage_throw_helper.html b/dom/tests/mochitest/whatwg/postMessage_throw_helper.html new file mode 100644 index 0000000000..b1d3ddce7d --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_throw_helper.html @@ -0,0 +1,24 @@ + + + + postMessage throwing page + + + +

No location!

+ + diff --git a/dom/tests/mochitest/whatwg/postMessage_transfer_helper.html b/dom/tests/mochitest/whatwg/postMessage_transfer_helper.html new file mode 100644 index 0000000000..03c4c1030b --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_transfer_helper.html @@ -0,0 +1,15 @@ + + + + postMessage transferable tests helper + + + + + diff --git a/dom/tests/mochitest/whatwg/postMessage_userpass_helper.html b/dom/tests/mochitest/whatwg/postMessage_userpass_helper.html new file mode 100644 index 0000000000..762cf52f9f --- /dev/null +++ b/dom/tests/mochitest/whatwg/postMessage_userpass_helper.html @@ -0,0 +1,34 @@ + + + + Username/password page for postMessage tests + + + +

Kid iframe

+ + + diff --git a/dom/tests/mochitest/whatwg/test_MessageEvent.html b/dom/tests/mochitest/whatwg/test_MessageEvent.html new file mode 100644 index 0000000000..41e1a7bcb4 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_MessageEvent.html @@ -0,0 +1,102 @@ + + + + + MessageEvent tests + + + + +Mozilla Bug 387706 +

+ + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_MessageEvent_dispatchToOther.html b/dom/tests/mochitest/whatwg/test_MessageEvent_dispatchToOther.html new file mode 100644 index 0000000000..d5d2f4c454 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_MessageEvent_dispatchToOther.html @@ -0,0 +1,59 @@ + + + + + Dispatching MessageEvent across origins + + + + +Mozilla Bug 387706 +

+ + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_bug477323.html b/dom/tests/mochitest/whatwg/test_bug477323.html new file mode 100644 index 0000000000..66bad6288c --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_bug477323.html @@ -0,0 +1,64 @@ + + + + Dynamically assigned drag and drop handlers + + + + + + + + + + + + diff --git a/dom/tests/mochitest/whatwg/test_bug500328.html b/dom/tests/mochitest/whatwg/test_bug500328.html new file mode 100644 index 0000000000..20b2c36761 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_bug500328.html @@ -0,0 +1,769 @@ + + + + + Test for Bug 500328 + + + + + +Mozilla Bug 500328 +

+
+
+ + + link +
+
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_document_scripts.html b/dom/tests/mochitest/whatwg/test_document_scripts.html new file mode 100644 index 0000000000..f0d8d27449 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_document_scripts.html @@ -0,0 +1,55 @@ + + + + + Test for document.scripts (Bug 685774) + + + + + +Mozilla Bug 685774 + + + + + diff --git a/dom/tests/mochitest/whatwg/test_postMessage.html b/dom/tests/mochitest/whatwg/test_postMessage.html new file mode 100644 index 0000000000..a21abb9a00 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage.html @@ -0,0 +1,161 @@ + + + + + Basic postMessage tests + + + + +Mozilla Bug 387706 +

+ + + + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_basehref.html b/dom/tests/mochitest/whatwg/test_postMessage_basehref.html new file mode 100644 index 0000000000..4a0a167d9f --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_basehref.html @@ -0,0 +1,45 @@ + + + + + postMessage's interaction with a <base> tag + + + + + +Mozilla Bug 414815 +

+ + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_chrome.html b/dom/tests/mochitest/whatwg/test_postMessage_chrome.html new file mode 100644 index 0000000000..ceb19fc552 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_chrome.html @@ -0,0 +1,114 @@ + + + + + postMessage chrome tests + + + + + + +Mozilla Bug 387706 +

+ + + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_closed.html b/dom/tests/mochitest/whatwg/test_postMessage_closed.html new file mode 100644 index 0000000000..01fc1294a3 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_closed.html @@ -0,0 +1,77 @@ + + + + postMessage's interaction with closed windows + + + + +

Bug 417075

+

+ + +
+ +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_hash.html b/dom/tests/mochitest/whatwg/test_postMessage_hash.html new file mode 100644 index 0000000000..5942a200ca --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_hash.html @@ -0,0 +1,44 @@ + + + + postMessage's interaction with hash URIs + + + + + +

(no bug; this is a preemptive test)

+

+ + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_idn.xhtml b/dom/tests/mochitest/whatwg/test_postMessage_idn.xhtml new file mode 100644 index 0000000000..79a6ede714 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_idn.xhtml @@ -0,0 +1,66 @@ + + + + + + postMessage uri/domain values and IDN encoding + + + + +Mozilla Bug 387706 +

+ + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_joined.html b/dom/tests/mochitest/whatwg/test_postMessage_joined.html new file mode 100644 index 0000000000..560fbb2911 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_joined.html @@ -0,0 +1,53 @@ + + + + + postMessage with document.domain setting to join origins + + + + +Mozilla Bug 387706 +

+ + + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_onOther.html b/dom/tests/mochitest/whatwg/test_postMessage_onOther.html new file mode 100644 index 0000000000..502ebca36c --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_onOther.html @@ -0,0 +1,51 @@ + + + + + postMessage called through a different same-origin page + + + + +Mozilla Bug 387706 +

+ + + + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_origin.xhtml b/dom/tests/mochitest/whatwg/test_postMessage_origin.xhtml new file mode 100644 index 0000000000..dd027c09ff --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_origin.xhtml @@ -0,0 +1,465 @@ + + + + + postMessage from about:blank, data URLs + + + + +Mozilla Bug 417075 +

+ + + + + + + + + + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_override.html b/dom/tests/mochitest/whatwg/test_postMessage_override.html new file mode 100644 index 0000000000..8414344f8d --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_override.html @@ -0,0 +1,47 @@ + + + + + postMessage override test + + + + +Mozilla Bug 387706 +

+ + + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_special.xhtml b/dom/tests/mochitest/whatwg/test_postMessage_special.xhtml new file mode 100644 index 0000000000..deb3930550 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_special.xhtml @@ -0,0 +1,304 @@ + + + + + postMessage from about:blank, data URLs + + + + +Mozilla Bug 387706 +

+ + +
+\n" +
+    "\n" +
+    "

" + description + "

\n" + + ""; + + return contents; +} + +function finish() +{ + SimpleTest.finish(); +} + +var xhtmlns = "http://www.w3.org/1999/xhtml"; + +function insert(el) +{ + var content = $("content"); + content.parentNode.insertBefore(el, content); +} + +function setupBlank() +{ + var aboutBlankFrame = document.createElementNS(xhtmlns, "iframe"); + aboutBlankFrame.setAttribute("src", "about:blank"); + insert(aboutBlankFrame); + + aboutBlankWindow = aboutBlankFrame.contentWindow; + var doc = aboutBlankWindow.document; + doc.open(); + doc.write(getContents("This was about:blank #1", "about:blank-response")); + doc.close(); + + // I don't believe anything guarantees sync parsing, so we have to wait for + // the new window to poke us to actually do the test. :-\ +} + +function setupBlank2() +{ + var aboutBlank2Frame = document.createElementNS(xhtmlns, "iframe"); + aboutBlank2Frame.addEventListener("load", nextTest); + aboutBlank2Frame.setAttribute("src", "about:blank"); + + insert(aboutBlank2Frame); +} + +// Could use window.btoa here, but that's not standardized, and we want to be +// able to run these tests against browsers that don't support it. +var dataURI = "data:text/html;base64," + + b64(getContents("A data: URL", "data-response")); + +function setupData() +{ + var dataFrame = document.createElementNS(xhtmlns, "iframe"); + dataFrame.setAttribute("src", dataURI); + insert(dataFrame); + + dataWindow = dataFrame.contentWindow; + + // ...and wait again for the window to load... +} + +var count = 0; +function nextTest() +{ + switch (count++) + { + case 0: + testBlank(); + break; + + case 1: + testBlank2(); + break; + + case 2: + testData(); + break; + + default: + ok(false, "unreached"); + break; + } +} + +function testBlank() +{ + aboutBlankWindow.postMessage("from-opener", "http://mochi.test:8888"); +} + +function testBlank2() +{ + // For some reason we can't access this across browsers prior to the iframe + // loading, so set its value here. + aboutBlank2Window = window.frames[1]; + + var doc = aboutBlank2Window.document; + + doc.body.textContent = "This was about:blank #2"; + + var script = doc.createElement("script"); + script.textContent = + "window.parent.postMessage('about:blank2-response', " + + " 'http://mochi.test:8888');"; + doc.body.appendChild(script); +} + +function testData() +{ + dataWindow.postMessage("from-opener", "*"); +} + +window.addEventListener("message", messageReceiver); + +addLoadEvent(setupBlank); +]]> +
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_structured_clone.html b/dom/tests/mochitest/whatwg/test_postMessage_structured_clone.html new file mode 100644 index 0000000000..9574dcacd4 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_structured_clone.html @@ -0,0 +1,70 @@ + + + + + postMessage uses structured clone + + + + + +Mozilla Bug 553125 +

+ + + + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_throw.html b/dom/tests/mochitest/whatwg/test_postMessage_throw.html new file mode 100644 index 0000000000..8d71ea38cf --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_throw.html @@ -0,0 +1,74 @@ + + + + + postMessage with a thrown exception + + + + +Mozilla Bug 387706 +

+ + + + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_transfer.html b/dom/tests/mochitest/whatwg/test_postMessage_transfer.html new file mode 100644 index 0000000000..e7d8758bd6 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_transfer.html @@ -0,0 +1,61 @@ + + + + + postMessage transferable tests + + + + +Mozilla Bug 822094 +

+ +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_postMessage_userpass.html b/dom/tests/mochitest/whatwg/test_postMessage_userpass.html new file mode 100644 index 0000000000..b47266fc45 --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_postMessage_userpass.html @@ -0,0 +1,46 @@ + + + + + postMessage from a page with username/password in its URI + + + + +Mozilla Bug 417075 +

+ + + + + +
+
+
+ + diff --git a/dom/tests/mochitest/whatwg/test_structuredCloneAndExposed.html b/dom/tests/mochitest/whatwg/test_structuredCloneAndExposed.html new file mode 100644 index 0000000000..2bd15247af --- /dev/null +++ b/dom/tests/mochitest/whatwg/test_structuredCloneAndExposed.html @@ -0,0 +1,307 @@ + + + + + Basic structured clone tests + + + + +Mozilla Bug 1828264 +

+ + +

+ + + +
+
+
+ + -- cgit v1.2.3