mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Backed out changeset 26f41a685662 (bug 1286746) for failing test_ext_runtime_connect_twoway.html and test_ext_storage_content.html on Android. r=backout
This commit is contained in:
parent
566ed8c855
commit
144e52be37
@ -1196,8 +1196,6 @@ function Messenger(context, messageManagers, sender, filter, delegate) {
|
||||
this.sender = sender;
|
||||
this.filter = filter;
|
||||
this.delegate = delegate;
|
||||
|
||||
MessageChannel.setupMessageManagers(messageManagers);
|
||||
}
|
||||
|
||||
Messenger.prototype = {
|
||||
|
@ -337,22 +337,6 @@ this.MessageChannel = {
|
||||
*/
|
||||
RESPONSE_ALL: 2,
|
||||
|
||||
/**
|
||||
* Initializes message handlers for the given message managers if needed.
|
||||
*
|
||||
* @param {[nsIMessageSender]} messageManagers
|
||||
*/
|
||||
setupMessageManagers(messageManagers) {
|
||||
for (let mm of messageManagers) {
|
||||
// This call initializes a FilteringMessageManager for |mm| if needed.
|
||||
// The FilteringMessageManager must be created to make sure that senders
|
||||
// of messages that expect a reply, such as MessageChannel:Message, do
|
||||
// actually receive a default reply even if there are no explicit message
|
||||
// handlers.
|
||||
this.messageManagers.get(mm);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns true if the peroperties of the `data` object match those in
|
||||
* the `filter` object. Matching is done on a strict equality basis,
|
||||
|
@ -70,7 +70,6 @@ skip-if = (os == 'android' || buildapp == 'b2g') # port.sender.tab is undefined
|
||||
[test_ext_runtime_getPlatformInfo.html]
|
||||
[test_ext_runtime_id.html]
|
||||
[test_ext_runtime_sendMessage.html]
|
||||
[test_ext_runtime_sendMessage_no_receiver.html]
|
||||
[test_ext_sandbox_var.html]
|
||||
[test_ext_sendmessage_reply.html]
|
||||
skip-if = (os == 'android' || buildapp == 'b2g') # sender.tab is undefined on b2g. Bug 1258975 on android.
|
||||
|
@ -1,38 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>WebExtension test</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/ExtensionTestUtils.js"></script>
|
||||
<script type="text/javascript" src="head.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
add_task(function* test_sendMessage_without_listener() {
|
||||
function backgroundScript() {
|
||||
browser.runtime.sendMessage("msg").then(reply => {
|
||||
browser.test.assertEq(undefined, reply);
|
||||
browser.test.notifyFail("Did not expect a reply to sendMessage");
|
||||
}, error => {
|
||||
browser.test.assertEq("Could not establish connection. Receiving end does not exist.", error.message);
|
||||
browser.test.notifyPass("sendMessage callback was invoked");
|
||||
});
|
||||
}
|
||||
let extensionData = {
|
||||
background: `(${backgroundScript})();`,
|
||||
};
|
||||
|
||||
let extension = ExtensionTestUtils.loadExtension(extensionData);
|
||||
yield extension.startup();
|
||||
|
||||
yield extension.awaitFinish("sendMessage callback was invoked");
|
||||
|
||||
yield extension.unload();
|
||||
});
|
||||
</script>
|
||||
</body>
|
Loading…
Reference in New Issue
Block a user