diff options
Diffstat (limited to 'tools/addon-sdk-1.5/packages/addon-kit/data')
6 files changed, 70 insertions, 0 deletions
diff --git a/tools/addon-sdk-1.5/packages/addon-kit/data/moz_favicon.ico b/tools/addon-sdk-1.5/packages/addon-kit/data/moz_favicon.ico Binary files differnew file mode 100644 index 0000000..d444389 --- /dev/null +++ b/tools/addon-sdk-1.5/packages/addon-kit/data/moz_favicon.ico diff --git a/tools/addon-sdk-1.5/packages/addon-kit/data/test-context-menu.js b/tools/addon-sdk-1.5/packages/addon-kit/data/test-context-menu.js new file mode 100644 index 0000000..13c4eb2 --- /dev/null +++ b/tools/addon-sdk-1.5/packages/addon-kit/data/test-context-menu.js @@ -0,0 +1,5 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +self.on("context", function () true); diff --git a/tools/addon-sdk-1.5/packages/addon-kit/data/test-page-mod.html b/tools/addon-sdk-1.5/packages/addon-kit/data/test-page-mod.html new file mode 100644 index 0000000..da3ec99 --- /dev/null +++ b/tools/addon-sdk-1.5/packages/addon-kit/data/test-page-mod.html @@ -0,0 +1,12 @@ +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<html> +<head> + <title>Page Mod test</title> +</head> +<body> + <p id="paragraph">Lorem ipsum dolor sit amet.</p> +</body> +</html> diff --git a/tools/addon-sdk-1.5/packages/addon-kit/data/test-page-worker.html b/tools/addon-sdk-1.5/packages/addon-kit/data/test-page-worker.html new file mode 100644 index 0000000..aabe1df --- /dev/null +++ b/tools/addon-sdk-1.5/packages/addon-kit/data/test-page-worker.html @@ -0,0 +1,12 @@ +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<html> +<head> + <title>Page Worker test</title> +</head> +<body> + <p id="paragraph">Lorem ipsum dolor sit amet.</p> +</body> +</html> diff --git a/tools/addon-sdk-1.5/packages/addon-kit/data/test-page-worker.js b/tools/addon-sdk-1.5/packages/addon-kit/data/test-page-worker.js new file mode 100644 index 0000000..d59ccae --- /dev/null +++ b/tools/addon-sdk-1.5/packages/addon-kit/data/test-page-worker.js @@ -0,0 +1,29 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + +// get title directly +self.postMessage(["assertEqual", document.title, "Page Worker test", + "Correct page title accessed directly"]); + +// get <p> directly +let p = document.getElementById("paragraph"); +self.postMessage(["assert", !!p, "<p> can be accessed directly"]); +self.postMessage(["assertEqual", p.firstChild.nodeValue, + "Lorem ipsum dolor sit amet.", + "Correct text node expected"]); + +// Modify page +let div = document.createElement("div"); +div.setAttribute("id", "block"); +div.appendChild(document.createTextNode("Test text created")); +document.body.appendChild(div); + +// Check back the modification +div = document.getElementById("block"); +self.postMessage(["assert", !!div, "<div> can be accessed directly"]); +self.postMessage(["assertEqual", div.firstChild.nodeValue, + "Test text created", "Correct text node expected"]); +self.postMessage(["done"]); + diff --git a/tools/addon-sdk-1.5/packages/addon-kit/data/test.html b/tools/addon-sdk-1.5/packages/addon-kit/data/test.html new file mode 100644 index 0000000..0c7cf24 --- /dev/null +++ b/tools/addon-sdk-1.5/packages/addon-kit/data/test.html @@ -0,0 +1,12 @@ +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<html> + <head> + <title>foo</title> + </head> + <body> + <p>bar</p> + </body> +</html> |