From 2aa4a82499d4becd2284cdb482213d541b8804dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 16:29:10 +0200 Subject: Adding upstream version 86.0.1. Signed-off-by: Daniel Baumann --- dom/l10n/tests/mochitest/.eslintrc.js | 5 + dom/l10n/tests/mochitest/browser.ini | 4 + dom/l10n/tests/mochitest/chrome.ini | 44 +++ dom/l10n/tests/mochitest/document_l10n/README.txt | 3 + .../document_l10n/non-system-principal/README.txt | 3 + .../non-system-principal/browser_resource_uri.js | 84 +++++ .../non-system-principal/localization/test.ftl | 4 + .../document_l10n/non-system-principal/test.html | 36 +++ .../test_connectRoot_webcomponent.html | 90 ++++++ .../test_connectRoot_webcomponent_lazy.html | 98 ++++++ .../mochitest/document_l10n/test_docl10n.html | 57 ++++ .../mochitest/document_l10n/test_docl10n.xhtml | 60 ++++ .../mochitest/document_l10n/test_docl10n_lazy.html | 44 +++ .../document_l10n/test_docl10n_ready_rejected.html | 27 ++ .../test_docl10n_removeResourceIds.html | 59 ++++ .../mochitest/document_l10n/test_docl10n_sync.html | 54 ++++ .../document_l10n/test_unpriv_iframe.html | 26 ++ .../dom_localization/test_attr_sanitized.html | 47 +++ .../dom_localization/test_connectRoot.html | 43 +++ .../test_connectRoot_webcomponent.html | 70 +++++ .../dom_localization/test_disconnectRoot.html | 58 ++++ .../mochitest/dom_localization/test_domloc.xhtml | 66 ++++ .../dom_localization/test_getAttributes.html | 52 ++++ .../dom_localization/test_l10n_mutations.html | 53 ++++ .../mochitest/dom_localization/test_overlay.html | 56 ++++ .../dom_localization/test_overlay_missing_all.html | 40 +++ .../test_overlay_missing_children.html | 49 +++ .../dom_localization/test_overlay_repeated.html | 46 +++ .../dom_localization/test_overlay_sanitized.html | 50 +++ .../dom_localization/test_repeated_l10nid.html | 58 ++++ .../dom_localization/test_setAttributes.html | 38 +++ .../dom_localization/test_translateElements.html | 42 +++ .../dom_localization/test_translateFragment.html | 44 +++ .../dom_localization/test_translateRoots.html | 52 ++++ .../test_append_content_post_dcl.html | 30 ++ .../test_append_content_pre_dcl.html | 28 ++ .../test_append_fragment_post_dcl.html | 39 +++ .../test_disconnectedRoot_webcomponent.html | 146 +++++++++ .../l10n_mutations/test_pause_observing.html | 44 +++ .../l10n_mutations/test_set_attributes.html | 37 +++ .../mochitest/l10n_mutations/test_template.html | 37 +++ .../mochitest/l10n_overlays/test_attributes.html | 86 ++++++ .../l10n_overlays/test_extra_text_markup.html | 136 ++++++++ .../l10n_overlays/test_functional_children.html | 344 +++++++++++++++++++++ .../l10n_overlays/test_l10n_overlays.xhtml | 87 ++++++ .../mochitest/l10n_overlays/test_same_id.html | 57 ++++ .../mochitest/l10n_overlays/test_same_id_args.html | 57 ++++ .../l10n_overlays/test_text_children.html | 74 +++++ .../tests/mochitest/l10n_overlays/test_title.html | 60 ++++ dom/l10n/tests/mochitest/mochitest.ini | 1 + 50 files changed, 2825 insertions(+) create mode 100644 dom/l10n/tests/mochitest/.eslintrc.js create mode 100644 dom/l10n/tests/mochitest/browser.ini create mode 100644 dom/l10n/tests/mochitest/chrome.ini create mode 100644 dom/l10n/tests/mochitest/document_l10n/README.txt create mode 100644 dom/l10n/tests/mochitest/document_l10n/non-system-principal/README.txt create mode 100644 dom/l10n/tests/mochitest/document_l10n/non-system-principal/browser_resource_uri.js create mode 100644 dom/l10n/tests/mochitest/document_l10n/non-system-principal/localization/test.ftl create mode 100644 dom/l10n/tests/mochitest/document_l10n/non-system-principal/test.html create mode 100644 dom/l10n/tests/mochitest/document_l10n/test_connectRoot_webcomponent.html create mode 100644 dom/l10n/tests/mochitest/document_l10n/test_connectRoot_webcomponent_lazy.html create mode 100644 dom/l10n/tests/mochitest/document_l10n/test_docl10n.html create mode 100644 dom/l10n/tests/mochitest/document_l10n/test_docl10n.xhtml create mode 100644 dom/l10n/tests/mochitest/document_l10n/test_docl10n_lazy.html create mode 100644 dom/l10n/tests/mochitest/document_l10n/test_docl10n_ready_rejected.html create mode 100644 dom/l10n/tests/mochitest/document_l10n/test_docl10n_removeResourceIds.html create mode 100644 dom/l10n/tests/mochitest/document_l10n/test_docl10n_sync.html create mode 100644 dom/l10n/tests/mochitest/document_l10n/test_unpriv_iframe.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_attr_sanitized.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_connectRoot.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_connectRoot_webcomponent.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_disconnectRoot.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_domloc.xhtml create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_getAttributes.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_l10n_mutations.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_overlay.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_overlay_missing_all.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_overlay_missing_children.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_overlay_repeated.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_overlay_sanitized.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_repeated_l10nid.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_setAttributes.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_translateElements.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_translateFragment.html create mode 100644 dom/l10n/tests/mochitest/dom_localization/test_translateRoots.html create mode 100644 dom/l10n/tests/mochitest/l10n_mutations/test_append_content_post_dcl.html create mode 100644 dom/l10n/tests/mochitest/l10n_mutations/test_append_content_pre_dcl.html create mode 100644 dom/l10n/tests/mochitest/l10n_mutations/test_append_fragment_post_dcl.html create mode 100644 dom/l10n/tests/mochitest/l10n_mutations/test_disconnectedRoot_webcomponent.html create mode 100644 dom/l10n/tests/mochitest/l10n_mutations/test_pause_observing.html create mode 100644 dom/l10n/tests/mochitest/l10n_mutations/test_set_attributes.html create mode 100644 dom/l10n/tests/mochitest/l10n_mutations/test_template.html create mode 100644 dom/l10n/tests/mochitest/l10n_overlays/test_attributes.html create mode 100644 dom/l10n/tests/mochitest/l10n_overlays/test_extra_text_markup.html create mode 100644 dom/l10n/tests/mochitest/l10n_overlays/test_functional_children.html create mode 100644 dom/l10n/tests/mochitest/l10n_overlays/test_l10n_overlays.xhtml create mode 100644 dom/l10n/tests/mochitest/l10n_overlays/test_same_id.html create mode 100644 dom/l10n/tests/mochitest/l10n_overlays/test_same_id_args.html create mode 100644 dom/l10n/tests/mochitest/l10n_overlays/test_text_children.html create mode 100644 dom/l10n/tests/mochitest/l10n_overlays/test_title.html create mode 100644 dom/l10n/tests/mochitest/mochitest.ini (limited to 'dom/l10n/tests/mochitest') diff --git a/dom/l10n/tests/mochitest/.eslintrc.js b/dom/l10n/tests/mochitest/.eslintrc.js new file mode 100644 index 0000000000..1779fd7f1c --- /dev/null +++ b/dom/l10n/tests/mochitest/.eslintrc.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = { + extends: ["plugin:mozilla/browser-test"], +}; diff --git a/dom/l10n/tests/mochitest/browser.ini b/dom/l10n/tests/mochitest/browser.ini new file mode 100644 index 0000000000..e1ef9ad541 --- /dev/null +++ b/dom/l10n/tests/mochitest/browser.ini @@ -0,0 +1,4 @@ +[document_l10n/non-system-principal/browser_resource_uri.js] +support-files = + document_l10n/non-system-principal/test.html + document_l10n/non-system-principal/localization/test.ftl diff --git a/dom/l10n/tests/mochitest/chrome.ini b/dom/l10n/tests/mochitest/chrome.ini new file mode 100644 index 0000000000..d9e984ffcc --- /dev/null +++ b/dom/l10n/tests/mochitest/chrome.ini @@ -0,0 +1,44 @@ +[l10n_overlays/test_attributes.html] +[l10n_overlays/test_functional_children.html] +[l10n_overlays/test_text_children.html] +[l10n_overlays/test_extra_text_markup.html] +[l10n_overlays/test_l10n_overlays.xhtml] +[l10n_overlays/test_same_id.html] +[l10n_overlays/test_same_id_args.html] +[l10n_overlays/test_title.html] + +[l10n_mutations/test_append_content_post_dcl.html] +[l10n_mutations/test_append_content_pre_dcl.html] +[l10n_mutations/test_append_fragment_post_dcl.html] +[l10n_mutations/test_disconnectedRoot_webcomponent.html] +[l10n_mutations/test_set_attributes.html] +[l10n_mutations/test_pause_observing.html] +[l10n_mutations/test_template.html] + +[dom_localization/test_attr_sanitized.html] +[dom_localization/test_getAttributes.html] +[dom_localization/test_setAttributes.html] +[dom_localization/test_translateElements.html] +[dom_localization/test_translateFragment.html] +[dom_localization/test_connectRoot.html] +[dom_localization/test_connectRoot_webcomponent.html] +[dom_localization/test_disconnectRoot.html] +[dom_localization/test_repeated_l10nid.html] +[dom_localization/test_translateRoots.html] +[dom_localization/test_l10n_mutations.html] +[dom_localization/test_overlay.html] +[dom_localization/test_overlay_repeated.html] +[dom_localization/test_overlay_missing_all.html] +[dom_localization/test_overlay_missing_children.html] +[dom_localization/test_overlay_sanitized.html] +[dom_localization/test_domloc.xhtml] + + +[document_l10n/test_docl10n.xhtml] +[document_l10n/test_docl10n.html] +[document_l10n/test_docl10n_sync.html] +[document_l10n/test_docl10n_ready_rejected.html] +[document_l10n/test_docl10n_removeResourceIds.html] +[document_l10n/test_docl10n_lazy.html] +[document_l10n/test_connectRoot_webcomponent.html] +[document_l10n/test_connectRoot_webcomponent_lazy.html] diff --git a/dom/l10n/tests/mochitest/document_l10n/README.txt b/dom/l10n/tests/mochitest/document_l10n/README.txt new file mode 100644 index 0000000000..b798a5039a --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/README.txt @@ -0,0 +1,3 @@ +Tests in this directory cover support for DocumentL10n +WebIDL API across different use cases such as +processes, principals and so on. diff --git a/dom/l10n/tests/mochitest/document_l10n/non-system-principal/README.txt b/dom/l10n/tests/mochitest/document_l10n/non-system-principal/README.txt new file mode 100644 index 0000000000..d0cc074166 --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/non-system-principal/README.txt @@ -0,0 +1,3 @@ +Tests in this directory cover the functionality +of DocumentL10n WebIDL API in non-system-principal +scenario. diff --git a/dom/l10n/tests/mochitest/document_l10n/non-system-principal/browser_resource_uri.js b/dom/l10n/tests/mochitest/document_l10n/non-system-principal/browser_resource_uri.js new file mode 100644 index 0000000000..00433c5314 --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/non-system-principal/browser_resource_uri.js @@ -0,0 +1,84 @@ +const { L10nRegistry, FileSource } = ChromeUtils.import( + "resource://gre/modules/L10nRegistry.jsm" +); + +let uri = + "chrome://mochitests/content/browser/dom/l10n/tests/mochitest//document_l10n/non-system-principal/"; +let protocol = Services.io + .getProtocolHandler("resource") + .QueryInterface(Ci.nsIResProtocolHandler); + +protocol.setSubstitution("l10n-test", Services.io.newURI(uri)); + +// Since we want the mock source to work with all locales, we're going +// to register it for currently used locales, and we'll put the path that +// doesn't use the `{locale}` component to make it work irrelevant of +// what locale the mochitest is running in. +// +// Notice: we're using a `chrome://` protocol here only for convenience reasons. +// Real sources should use `resource://` protocol. +let locales = Services.locale.appLocalesAsBCP47; +let mockSource = new FileSource("test", locales, `${uri}localization/`); +L10nRegistry.registerSources([mockSource]); + +registerCleanupFunction(() => { + protocol.setSubstitution("l10n-test", null); + L10nRegistry.removeSources(["test"]); + SpecialPowers.pushPrefEnv({ + set: [["dom.ipc.processPrelaunch.enabled", true]], + }); +}); + +add_task(async () => { + // Bug 1640333 - windows fails (sometimes) to ever get document.l10n.ready + // if e10s process caching is enabled + await SpecialPowers.pushPrefEnv({ + set: [["dom.ipc.processPrelaunch.enabled", false]], + }); + await BrowserTestUtils.withNewTab( + "resource://l10n-test/test.html", + async browser => { + await SpecialPowers.spawn(browser, [], async function() { + let document = content.document; + let window = document.defaultView; + + let { customMsg, l10nArgs } = await document.testsReadyPromise; + + let desc = document.getElementById("main-desc"); + + // We can test here for a particular value because we're + // using a mock file source which is locale independent. + // + // If you're writing a test that verifies that a UI + // widget got real localization, you should not rely on + // the particular value, but rather on the content not + // being empty (to keep the test pass in non-en-US locales). + is(desc.textContent, "This is a mock page title"); + + // Test for l10n.getAttributes + let label = document.getElementById("label1"); + is(l10nArgs.id, "subtitle"); + is(l10nArgs.args.name, "Firefox"); + + // Test for manual value formatting + is(customMsg, "This is a custom message formatted from JS."); + + // Since we applied the `data-l10n-id` attribute + // on `label` in this microtask, we have to wait for + // the next paint to verify that the MutationObserver + // applied the translation. + await new Promise(resolve => { + let verifyL10n = () => { + if (!label.textContent.includes("Firefox")) { + window.requestAnimationFrame(verifyL10n); + } else { + resolve(); + } + }; + + window.requestAnimationFrame(verifyL10n); + }); + }); + } + ); +}); diff --git a/dom/l10n/tests/mochitest/document_l10n/non-system-principal/localization/test.ftl b/dom/l10n/tests/mochitest/document_l10n/non-system-principal/localization/test.ftl new file mode 100644 index 0000000000..a5da5a8f00 --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/non-system-principal/localization/test.ftl @@ -0,0 +1,4 @@ +page-title = This is a mock page title +subtitle = This is a label for { $name } + +custom-message = This is a custom message formatted from JS. diff --git a/dom/l10n/tests/mochitest/document_l10n/non-system-principal/test.html b/dom/l10n/tests/mochitest/document_l10n/non-system-principal/test.html new file mode 100644 index 0000000000..3b6784ed6b --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/non-system-principal/test.html @@ -0,0 +1,36 @@ + + + + + Test DocumentL10n in HTML environment + + + + +

+ +

+ + diff --git a/dom/l10n/tests/mochitest/document_l10n/test_connectRoot_webcomponent.html b/dom/l10n/tests/mochitest/document_l10n/test_connectRoot_webcomponent.html new file mode 100644 index 0000000000..3f2def3547 --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/test_connectRoot_webcomponent.html @@ -0,0 +1,90 @@ + + + + + Test Web Component connecting into Document's l10n + + + + + + + + + + + + diff --git a/dom/l10n/tests/mochitest/document_l10n/test_connectRoot_webcomponent_lazy.html b/dom/l10n/tests/mochitest/document_l10n/test_connectRoot_webcomponent_lazy.html new file mode 100644 index 0000000000..fee14d6206 --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/test_connectRoot_webcomponent_lazy.html @@ -0,0 +1,98 @@ + + + + + Test Web Component connecting into Document's l10n + + + + + + + + diff --git a/dom/l10n/tests/mochitest/document_l10n/test_docl10n.html b/dom/l10n/tests/mochitest/document_l10n/test_docl10n.html new file mode 100644 index 0000000000..9f2c916f47 --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/test_docl10n.html @@ -0,0 +1,57 @@ + + + + + Test DocumentL10n in HTML environment + + + + + + +

+ +

+ + diff --git a/dom/l10n/tests/mochitest/document_l10n/test_docl10n.xhtml b/dom/l10n/tests/mochitest/document_l10n/test_docl10n.xhtml new file mode 100644 index 0000000000..3b20c0620e --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/test_docl10n.xhtml @@ -0,0 +1,60 @@ + + + + + + + + + Test DocumentL10n in HTML environment + + + + + + +

+ +

+ + diff --git a/dom/l10n/tests/mochitest/document_l10n/test_docl10n_lazy.html b/dom/l10n/tests/mochitest/document_l10n/test_docl10n_lazy.html new file mode 100644 index 0000000000..6be2a6f45e --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/test_docl10n_lazy.html @@ -0,0 +1,44 @@ + + + + + Test Lazy DocumentL10n in HTML environment + + + + + +

+ +

+ + diff --git a/dom/l10n/tests/mochitest/document_l10n/test_docl10n_ready_rejected.html b/dom/l10n/tests/mochitest/document_l10n/test_docl10n_ready_rejected.html new file mode 100644 index 0000000000..933305138b --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/test_docl10n_ready_rejected.html @@ -0,0 +1,27 @@ + + + + + Test mozIDOMLocalization.ready rejected state + + + + + + +

+ + diff --git a/dom/l10n/tests/mochitest/document_l10n/test_docl10n_removeResourceIds.html b/dom/l10n/tests/mochitest/document_l10n/test_docl10n_removeResourceIds.html new file mode 100644 index 0000000000..19e4153e00 --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/test_docl10n_removeResourceIds.html @@ -0,0 +1,59 @@ + + + + + Test DocumentL10n::RemoveResourceIds + + + + + + + + + diff --git a/dom/l10n/tests/mochitest/document_l10n/test_docl10n_sync.html b/dom/l10n/tests/mochitest/document_l10n/test_docl10n_sync.html new file mode 100644 index 0000000000..f931ed3351 --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/test_docl10n_sync.html @@ -0,0 +1,54 @@ + + + + + Test DocumentL10n in HTML environment + + + + + + +

+ +

+ + diff --git a/dom/l10n/tests/mochitest/document_l10n/test_unpriv_iframe.html b/dom/l10n/tests/mochitest/document_l10n/test_unpriv_iframe.html new file mode 100644 index 0000000000..4f4b29c500 --- /dev/null +++ b/dom/l10n/tests/mochitest/document_l10n/test_unpriv_iframe.html @@ -0,0 +1,26 @@ + + + + + Ensure unprivilaged document cannot access document.l10n in an iframe + + + + + + + + + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_attr_sanitized.html b/dom/l10n/tests/mochitest/dom_localization/test_attr_sanitized.html new file mode 100644 index 0000000000..19ff6aee2f --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_attr_sanitized.html @@ -0,0 +1,47 @@ + + + + + Test DOMLocalization's attr sanitization functionality + + + + + +

+

+ + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_connectRoot.html b/dom/l10n/tests/mochitest/dom_localization/test_connectRoot.html new file mode 100644 index 0000000000..ae6c6a8e01 --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_connectRoot.html @@ -0,0 +1,43 @@ + + + + + Test DOMLocalization.prototype.connectRoot + + + + + +

+ + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_connectRoot_webcomponent.html b/dom/l10n/tests/mochitest/dom_localization/test_connectRoot_webcomponent.html new file mode 100644 index 0000000000..49ead91d4b --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_connectRoot_webcomponent.html @@ -0,0 +1,70 @@ + + + + + Test DOMLocalization.prototype.connectRoot with Web Components + + + + + + + + + + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_disconnectRoot.html b/dom/l10n/tests/mochitest/dom_localization/test_disconnectRoot.html new file mode 100644 index 0000000000..58279c4dec --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_disconnectRoot.html @@ -0,0 +1,58 @@ + + + + + Test DOMLocalization.prototype.disconnectRoot + + + + + +

+ + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_domloc.xhtml b/dom/l10n/tests/mochitest/dom_localization/test_domloc.xhtml new file mode 100644 index 0000000000..3cf167cce5 --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_domloc.xhtml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_getAttributes.html b/dom/l10n/tests/mochitest/dom_localization/test_getAttributes.html new file mode 100644 index 0000000000..c0fdf96026 --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_getAttributes.html @@ -0,0 +1,52 @@ + + + + + Test DOMLocalization.prototype.getAttributes + + + + + +

+

+

+ + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_l10n_mutations.html b/dom/l10n/tests/mochitest/dom_localization/test_l10n_mutations.html new file mode 100644 index 0000000000..e29e5f347a --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_l10n_mutations.html @@ -0,0 +1,53 @@ + + + + + Test DOMLocalization's MutationObserver + + + + + +

+

+
+ + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_overlay.html b/dom/l10n/tests/mochitest/dom_localization/test_overlay.html new file mode 100644 index 0000000000..8127e1ba2e --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_overlay.html @@ -0,0 +1,56 @@ + + + + + Test DOMLocalization's DOMOverlay functionality + + + + + +

+

+ +

+ + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_overlay_missing_all.html b/dom/l10n/tests/mochitest/dom_localization/test_overlay_missing_all.html new file mode 100644 index 0000000000..2200fe7ea6 --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_overlay_missing_all.html @@ -0,0 +1,40 @@ + + + + + Test DOMLocalization's DOMOverlay functionality + + + + + +

+ + + +

+ + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_overlay_missing_children.html b/dom/l10n/tests/mochitest/dom_localization/test_overlay_missing_children.html new file mode 100644 index 0000000000..20d58ba630 --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_overlay_missing_children.html @@ -0,0 +1,49 @@ + + + + + Test DOMLocalization's DOMOverlay functionality + + + + + +

+ + + +

+ + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_overlay_repeated.html b/dom/l10n/tests/mochitest/dom_localization/test_overlay_repeated.html new file mode 100644 index 0000000000..2d202b2e7f --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_overlay_repeated.html @@ -0,0 +1,46 @@ + + + + + Test DOMLocalization's DOMOverlay functionality + + + + + +

+ + +

+ + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_overlay_sanitized.html b/dom/l10n/tests/mochitest/dom_localization/test_overlay_sanitized.html new file mode 100644 index 0000000000..74472e88b0 --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_overlay_sanitized.html @@ -0,0 +1,50 @@ + + + + + Test DOMLocalization's DOMOverlay functionality + + + + + + + + + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_repeated_l10nid.html b/dom/l10n/tests/mochitest/dom_localization/test_repeated_l10nid.html new file mode 100644 index 0000000000..5ac848c033 --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_repeated_l10nid.html @@ -0,0 +1,58 @@ + + + + + Test DOMLocalization's matching l10nIds functionality + + + + + +

+

+ +

+ +

+ +

+ +

+ + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_setAttributes.html b/dom/l10n/tests/mochitest/dom_localization/test_setAttributes.html new file mode 100644 index 0000000000..1c4d93c2e7 --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_setAttributes.html @@ -0,0 +1,38 @@ + + + + + Test DOMLocalization.prototype.setAttributes + + + + + +

+ + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_translateElements.html b/dom/l10n/tests/mochitest/dom_localization/test_translateElements.html new file mode 100644 index 0000000000..20bc015a66 --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_translateElements.html @@ -0,0 +1,42 @@ + + + + + Test DOMLocalization.prototype.translateElements + + + + + +

+ + + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_translateFragment.html b/dom/l10n/tests/mochitest/dom_localization/test_translateFragment.html new file mode 100644 index 0000000000..8f592bbfb7 --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_translateFragment.html @@ -0,0 +1,44 @@ + + + + + Test DOMLocalization.prototype.translateFragment + + + + + +

+

+

+

+ + diff --git a/dom/l10n/tests/mochitest/dom_localization/test_translateRoots.html b/dom/l10n/tests/mochitest/dom_localization/test_translateRoots.html new file mode 100644 index 0000000000..1daba8c5ae --- /dev/null +++ b/dom/l10n/tests/mochitest/dom_localization/test_translateRoots.html @@ -0,0 +1,52 @@ + + + + + Test DOMLocalization.prototype.translateRoots + + + + + +
+

+
+
+

+
+ + diff --git a/dom/l10n/tests/mochitest/l10n_mutations/test_append_content_post_dcl.html b/dom/l10n/tests/mochitest/l10n_mutations/test_append_content_post_dcl.html new file mode 100644 index 0000000000..2b2cf6d881 --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_mutations/test_append_content_post_dcl.html @@ -0,0 +1,30 @@ + + + + + Test L10n Mutations for ContentAppended after DOMContentLoaded + + + + + + + + diff --git a/dom/l10n/tests/mochitest/l10n_mutations/test_append_content_pre_dcl.html b/dom/l10n/tests/mochitest/l10n_mutations/test_append_content_pre_dcl.html new file mode 100644 index 0000000000..80255cf649 --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_mutations/test_append_content_pre_dcl.html @@ -0,0 +1,28 @@ + + + + + Test L10n Mutations for ContentAppended before DOMContentLoaded + + + + + + + + diff --git a/dom/l10n/tests/mochitest/l10n_mutations/test_append_fragment_post_dcl.html b/dom/l10n/tests/mochitest/l10n_mutations/test_append_fragment_post_dcl.html new file mode 100644 index 0000000000..b87479868e --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_mutations/test_append_fragment_post_dcl.html @@ -0,0 +1,39 @@ + + + + + Test L10n Mutations for appending a fragment after DOMContentLoaded + + + + + + + + diff --git a/dom/l10n/tests/mochitest/l10n_mutations/test_disconnectedRoot_webcomponent.html b/dom/l10n/tests/mochitest/l10n_mutations/test_disconnectedRoot_webcomponent.html new file mode 100644 index 0000000000..9d9f0cfb2a --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_mutations/test_disconnectedRoot_webcomponent.html @@ -0,0 +1,146 @@ + + + + + Test DOMLocalization.prototype.connectRoot with Web Components + + + + + + +

+ + + + + diff --git a/dom/l10n/tests/mochitest/l10n_mutations/test_pause_observing.html b/dom/l10n/tests/mochitest/l10n_mutations/test_pause_observing.html new file mode 100644 index 0000000000..1ba6e897f3 --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_mutations/test_pause_observing.html @@ -0,0 +1,44 @@ + + + + + Test L10n Mutations for Pause/Resume Observing + + + + + + + + diff --git a/dom/l10n/tests/mochitest/l10n_mutations/test_set_attributes.html b/dom/l10n/tests/mochitest/l10n_mutations/test_set_attributes.html new file mode 100644 index 0000000000..587c62d7b6 --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_mutations/test_set_attributes.html @@ -0,0 +1,37 @@ + + + + + Test L10n Mutations for AttributeChange after DOMContentLoaded + + + + + + + +
+
+ + diff --git a/dom/l10n/tests/mochitest/l10n_mutations/test_template.html b/dom/l10n/tests/mochitest/l10n_mutations/test_template.html new file mode 100644 index 0000000000..3d8bc60c7b --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_mutations/test_template.html @@ -0,0 +1,37 @@ + + + + + Test L10n Mutations in Template elements + + + + + + + + + diff --git a/dom/l10n/tests/mochitest/l10n_overlays/test_attributes.html b/dom/l10n/tests/mochitest/l10n_overlays/test_attributes.html new file mode 100644 index 0000000000..3d1f6048b2 --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_overlays/test_attributes.html @@ -0,0 +1,86 @@ + + + + + Test L10nOverlays Top-level attributes + + + + + + + diff --git a/dom/l10n/tests/mochitest/l10n_overlays/test_extra_text_markup.html b/dom/l10n/tests/mochitest/l10n_overlays/test_extra_text_markup.html new file mode 100644 index 0000000000..5f60599dfc --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_overlays/test_extra_text_markup.html @@ -0,0 +1,136 @@ + + + + + Test L10nOverlays Localized text markup + + + + + + + diff --git a/dom/l10n/tests/mochitest/l10n_overlays/test_functional_children.html b/dom/l10n/tests/mochitest/l10n_overlays/test_functional_children.html new file mode 100644 index 0000000000..dba5b6e633 --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_overlays/test_functional_children.html @@ -0,0 +1,344 @@ + + + + + Test L10nOverlays functional children test + + + + + + + diff --git a/dom/l10n/tests/mochitest/l10n_overlays/test_l10n_overlays.xhtml b/dom/l10n/tests/mochitest/l10n_overlays/test_l10n_overlays.xhtml new file mode 100644 index 0000000000..494958c573 --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_overlays/test_l10n_overlays.xhtml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/dom/l10n/tests/mochitest/l10n_overlays/test_same_id.html b/dom/l10n/tests/mochitest/l10n_overlays/test_same_id.html new file mode 100644 index 0000000000..a6567eda4e --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_overlays/test_same_id.html @@ -0,0 +1,57 @@ + + + + + Test Amount of mutations generated from DOM Overlays + + + + + + + + + diff --git a/dom/l10n/tests/mochitest/l10n_overlays/test_same_id_args.html b/dom/l10n/tests/mochitest/l10n_overlays/test_same_id_args.html new file mode 100644 index 0000000000..af2a108e46 --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_overlays/test_same_id_args.html @@ -0,0 +1,57 @@ + + + + + Test Amount of mutations generated from DOM Overlays + + + + + + + + + diff --git a/dom/l10n/tests/mochitest/l10n_overlays/test_text_children.html b/dom/l10n/tests/mochitest/l10n_overlays/test_text_children.html new file mode 100644 index 0000000000..1c2fab7ade --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_overlays/test_text_children.html @@ -0,0 +1,74 @@ + + + + + Test L10nOverlays Text-semantic argument elements + + + + + + + diff --git a/dom/l10n/tests/mochitest/l10n_overlays/test_title.html b/dom/l10n/tests/mochitest/l10n_overlays/test_title.html new file mode 100644 index 0000000000..4571589b8e --- /dev/null +++ b/dom/l10n/tests/mochitest/l10n_overlays/test_title.html @@ -0,0 +1,60 @@ + + + + + Test L10nOverlays Special treatment of the title element + + + + + + + diff --git a/dom/l10n/tests/mochitest/mochitest.ini b/dom/l10n/tests/mochitest/mochitest.ini new file mode 100644 index 0000000000..82af57c47c --- /dev/null +++ b/dom/l10n/tests/mochitest/mochitest.ini @@ -0,0 +1 @@ +[document_l10n/test_unpriv_iframe.html] -- cgit v1.2.3