aboutsummaryrefslogtreecommitdiff
path: root/tools/addon-sdk-1.5/packages/api-utils/tests/test-hidden-frame.js
diff options
context:
space:
mode:
authorGravatar Trevor Elliott <trevor@galois.com>2013-06-07 16:42:11 -0700
committerGravatar Trevor Elliott <trevor@galois.com>2013-06-07 16:48:17 -0700
commit8b5d3c6b75744cf5938f253d20f367999e92b1a7 (patch)
treeb516a82c5b198fd080d265e56b3edf19d1180f10 /tools/addon-sdk-1.5/packages/api-utils/tests/test-hidden-frame.js
parentf37588f9a4c7c6b418c64f03d82d48ecd14da217 (diff)
Remove the addon-sdk from the repo, and download it on demand
Diffstat (limited to 'tools/addon-sdk-1.5/packages/api-utils/tests/test-hidden-frame.js')
-rw-r--r--tools/addon-sdk-1.5/packages/api-utils/tests/test-hidden-frame.js51
1 files changed, 0 insertions, 51 deletions
diff --git a/tools/addon-sdk-1.5/packages/api-utils/tests/test-hidden-frame.js b/tools/addon-sdk-1.5/packages/api-utils/tests/test-hidden-frame.js
deleted file mode 100644
index 2441c3e..0000000
--- a/tools/addon-sdk-1.5/packages/api-utils/tests/test-hidden-frame.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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/. */
-
-let tests = {}, hiddenFrames, HiddenFrame;
-
-tests.testFrame = function(test) {
- let url = "data:text/html,<!DOCTYPE%20html>";
- test.waitUntilDone();
- let hiddenFrame = hiddenFrames.add(HiddenFrame({
- onReady: function () {
- test.assertEqual(this.element.contentWindow.location, "about:blank",
- "HiddenFrame loads about:blank by default.");
-
- function onDOMReady() {
- hiddenFrame.element.removeEventListener("DOMContentLoaded", onDOMReady,
- false);
- test.assertEqual(hiddenFrame.element.contentWindow.location, url,
- "HiddenFrame loads the specified content.");
- test.done();
- }
- this.element.addEventListener("DOMContentLoaded", onDOMReady, false);
- this.element.setAttribute("src", url);
- }
- }));
-};
-
-let hiddenFrameSupported = true;
-
-try {
- hiddenFrames = require("hidden-frame");
- HiddenFrame = hiddenFrames.HiddenFrame;
-}
-catch(ex if ex.message == [
- "The hidden-frame module currently supports only Firefox and Thunderbird. ",
- "In the future, we would like it to support other applications, however. ",
- "Please see https://bugzilla.mozilla.org/show_bug.cgi?id=546740 for more ",
- "information."
- ].join("")) {
- hiddenFrameSupported = false;
-}
-
-if (hiddenFrameSupported) {
- for (let test in tests)
- exports[test] = tests[test];
-}
-else {
- exports.testHiddenFrameNotSupported = function(test) {
- test.pass("The hidden-frame module is not supported on this app.");
- }
-}