diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-25 15:07:00 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:55:19 +0200 |
commit | eb70e6e3d0bff11c25f14b1196025791bf2308fb (patch) | |
tree | 5ef4ce17db83c74d7b05ec12c8f59e095a6dd5bd /toolkit/modules/tests/browser/browser_PromiseMessage.js | |
parent | 32ead795290b3399d56b4708fc75b77d296f6a1a (diff) | |
download | UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.gz UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.lz UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.xz UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.zip |
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/modules/tests/browser/browser_PromiseMessage.js')
-rw-r--r-- | toolkit/modules/tests/browser/browser_PromiseMessage.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/toolkit/modules/tests/browser/browser_PromiseMessage.js b/toolkit/modules/tests/browser/browser_PromiseMessage.js deleted file mode 100644 index e967ac4c9..000000000 --- a/toolkit/modules/tests/browser/browser_PromiseMessage.js +++ /dev/null @@ -1,38 +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/. */ -/* global Cu, BrowserTestUtils, is, ok, add_task, gBrowser */ -"use strict"; -Cu.import("resource://gre/modules/PromiseMessage.jsm", this); - - -const url = "http://example.org/tests/dom/manifest/test/resource.sjs"; - -/** - * Test basic API error conditions - */ -add_task(function* () { - yield BrowserTestUtils.withNewTab({gBrowser, url}, testPromiseMessageAPI) -}); - -function* testPromiseMessageAPI(aBrowser) { - // Reusing an existing message. - const msgKey = "DOM:WebManifest:hasManifestLink"; - const mm = aBrowser.messageManager; - const id = "this should not change"; - const foo = "neitherShouldThis"; - const data = {id, foo}; - - // This just returns false, and it doesn't matter for this test. - yield PromiseMessage.send(mm, msgKey, data); - - // Check that no new props were added - const props = Object.getOwnPropertyNames(data); - ok(props.length === 2, "There should only be 2 props"); - ok(props.includes("id"), "Has the id property"); - ok(props.includes("foo"), "Has the foo property"); - - // Check that the props didn't change. - is(data.id, id, "The id prop must not change."); - is(data.foo, foo, "The foo prop must not change."); -} |