Bug 784236 - Ensure chat windows don't end up in history/places. r=mixedpuppy

This commit is contained in:
Mark Hammond 2012-09-08 15:43:15 +10:00
parent 263b4a6af5
commit 6c6c10f735
2 changed files with 4 additions and 2 deletions

View File

@ -91,6 +91,7 @@ var tests = {
} }
}, },
testWorkerChatWindow: function(next) { testWorkerChatWindow: function(next) {
const chatUrl = "https://example.com/browser/browser/base/content/test/social_chat.html";
let port = Social.provider.port; let port = Social.provider.port;
ok(port, "provider has a port"); ok(port, "provider has a port");
port.onmessage = function (e) { port.onmessage = function (e) {
@ -103,10 +104,11 @@ var tests = {
chats.selectedChat.close(); chats.selectedChat.close();
} }
ok(!chats.selectedChat, "chats are all closed"); ok(!chats.selectedChat, "chats are all closed");
ensureSocialUrlNotRemembered(chatUrl);
next(); next();
break; break;
} }
} }
port.postMessage({topic: "test-worker-chat" }); port.postMessage({topic: "test-worker-chat", data: chatUrl});
} }
} }

View File

@ -64,7 +64,7 @@ onconnect = function(e) {
testPort.postMessage({topic:"got-flyout-visibility", result: event.data.result}); testPort.postMessage({topic:"got-flyout-visibility", result: event.data.result});
break; break;
case "test-worker-chat": case "test-worker-chat":
apiPort.postMessage({topic: "social.request-chat", data: "https://example.com/browser/browser/base/content/test/social_chat.html" }); apiPort.postMessage({topic: "social.request-chat", data: event.data.data });
break; break;
case "social.initialize": case "social.initialize":
// This is the workerAPI port, respond and set up a notification icon. // This is the workerAPI port, respond and set up a notification icon.