Skip to content

Commit

Permalink
Bug 839271: Address review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mossop committed Feb 8, 2013
1 parent 15196a1 commit f660caa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/sdk/context-menu.js
Expand Up @@ -373,7 +373,6 @@ function getItemWorkerForWindow(item, window) {
emit(item, "message", msg);
},
onDetach: function() {
console.log("Worker detach");
internal(item).workerMap.delete(id);
}
});
Expand Down
6 changes: 5 additions & 1 deletion test/test-context-menu.js
Expand Up @@ -481,7 +481,7 @@ exports.testURLContextRemove = function (test) {
};

// Loading a new page in the same tab should correctly start a new worker for
// and content scripts
// any content scripts
exports.testPageReload = function (test) {
test = new TestHelper(test);
let loader = test.newLoader();
Expand All @@ -496,6 +496,7 @@ exports.testPageReload = function (test) {
doc.body.setAttribute("showItem", "true");

test.showMenu(null, function (popup) {
// With the attribute true the item should be visible in the menu
test.checkMenu([item], [], []);
test.hideMenu(function() {
let browser = this.tabBrowser.getBrowserForTab(this.tab)
Expand All @@ -508,6 +509,9 @@ exports.testPageReload = function (test) {
doc.body.setAttribute("showItem", "false");

test.showMenu(null, function (popup) {
// In the new document with the attribute false the item should be
// hidden, but if the contentScript hasn't been reloaded it will
// still see the old value
test.checkMenu([item], [item], []);

test.done();
Expand Down

0 comments on commit f660caa

Please sign in to comment.