Failure in testAddons_RestartlessExtensionWorksAfterRestart if using about:newtab



Mozilla QA
Mozmill Tests
5 years ago
5 years ago


(Reporter: RemusPop, Assigned: RemusPop)



Firefox Tracking Flags

(firefox13 fixed, firefox14 fixed, firefox15 fixed, firefox16 fixed, firefox-esr10 unaffected)



(1 attachment)



5 years ago
closeAllTabs will open about:newtab as stated in bug 764782. This test right clicks after closeAlltabs is executed, but the extension item in the contextual menu is not shown when using about:newtab.
We have 2 options IMHO:
* open about:blank instead of using the new closeAllTabs
* find a way to modify the extension so it will be shown in any context menu.
* open a page from localhost

i think 2nd option is the hardest.
This could be an issue with the addon sdk the extension is using. Could be a bug in there. Alex, as author of the extension would you mind to check that?

Remus, in any case of the answer above, for the mentioned test we should simply open local test file in the current tab. Then it will work.

Comment 2

5 years ago
So are we safe using open("about:blank") before right clicking?
Not sure what you mean by that comment. But about:blank will work, yes.
(In reply to Henrik Skupin (:whimboo) from comment #1)
> This could be an issue with the addon sdk the extension is using. Could be a
> bug in there. Alex, as author of the extension would you mind to check that?
It's a problem with the SDK i guess. I'm using the "context-menu" library, but that does not seem to integrate in all context menus. Do we want to change the addon off the sdk? Or maybe try switching it to the latest version of the sdk?
Yeah, please try out the latest version of the SDK. If it is still a problem please report it as bug against it.

Comment 6

5 years ago
Created attachment 633504 [details] [diff] [review]
patch v1 (all branches)

Now we open about:blank before right clicking (in order to get the context menu).
Assignee: nobody → remus.pop
Attachment #633504 - Flags: review?(hskupin)


5 years ago
status-firefox13: --- → affected
status-firefox14: --- → affected
status-firefox15: --- → affected
status-firefox16: --- → affected
Comment on attachment 633504 [details] [diff] [review]
patch v1 (all branches)

># HG changeset patch
># User Remus Pop <>
># Date 1339765807 -10800
># Node ID f802213f5910369154b5a1dcc72488cf3eb9acd9
># Parent  3123f0da26f50648c428a23b482455c267f97c04
>Bug 764807 - Failure in testAddons_RestartlessExtensionWorksAfterRestart if using about:newtab. r=hskupin
>diff --git a/tests/functional/restartTests/testAddons_RestartlessExtensionWorksAfterRestart/test2.js b/tests/functional/restartTests/testAddons_RestartlessExtensionWorksAfterRestart/test2.js
>--- a/tests/functional/restartTests/testAddons_RestartlessExtensionWorksAfterRestart/test2.js
>+++ b/tests/functional/restartTests/testAddons_RestartlessExtensionWorksAfterRestart/test2.js
>@@ -1,24 +1,22 @@
> /* 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 */
> // Include required modules
> var addons = require("../../../../lib/addons");
> var {assert} = require("../../../../lib/assertions");
> var prefs = require("../../../../lib/prefs");
>-var tabs = require("../../../../lib/tabs");
> var utils = require("../../../../lib/utils");
> var EXPECTED_URL = "";
> function setupModule() {
>   controller = mozmill.getBrowserController();
>-  tabs.closeAllTabs(controller);
> }
> function teardownModule() {
>   prefs.preferences.clearUserPref("browser.urlbar.trimURLs");
>   addons.resetDiscoveryPaneURL();
>   delete persisted.addon;
>@@ -33,17 +31,19 @@ function testRestartlessExtensionWorksAf
>   // Context menu item that is provided by the restartless extension
>   var contextMenuItem = new elementslib.ID(controller.window.document,
>                                   +
>                                            "-context-menu-item-0");
>   var locationBar = new elementslib.ID(controller.window.document, "urlbar");
>-  // Open content area context menu
>+  // Open content area context menu in a blank page
>+  controller.waitForPageLoad();
>   controller.rightClick(new elementslib.XPath(controller.tabs.activeTab, "/html"));
>   // Click the item from the context menu to open mozilla.html from
>   // Close the context menu
>   utils.closeContentAreaContextMenu(controller);
>   controller.waitForPageLoad();
Attachment #633504 - Flags: review?(hskupin) → review+
Pushed to default:
Last Resolved: 5 years ago
status-firefox-esr10: --- → unaffected
status-firefox16: affected → fixed
Resolution: --- → FIXED (aurora) (beta) (release)
status-firefox13: affected → fixed
status-firefox14: affected → fixed
status-firefox15: affected → fixed


5 years ago
You need to log in before you can comment on or make changes to this bug.