Failure in testAddons_RestartlessExtensionWorksAfterRestart if using about:newtab

VERIFIED FIXED

Status

Mozilla QA
Mozmill Tests
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: RemusPop, Assigned: RemusPop)

Tracking

unspecified

Firefox Tracking Flags

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

Details

Attachments

(1 attachment)

(Assignee)

Description

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.
(Assignee)

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.
(Assignee)

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
Status: NEW → ASSIGNED
Attachment #633504 - Flags: review?(hskupin)
(Assignee)

Updated

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 <remus.pop@softvision.ro>
># 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 http://mozilla.org/MPL/2.0/. */
> 
> // 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 = "http://mozqa.com/data/firefox/layout/mozilla.html";
> 
> 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,
>                                            persisted.addon.id +
>                                            "-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.open("about:blank");
>+  controller.waitForPageLoad();
>   controller.rightClick(new elementslib.XPath(controller.tabs.activeTab, "/html"));
> 
>   // Click the item from the context menu to open mozilla.html from mozqa.com
>   controller.click(contextMenuItem);
> 
>   // Close the context menu
>   utils.closeContentAreaContextMenu(controller);
>   controller.waitForPageLoad();
Attachment #633504 - Flags: review?(hskupin) → review+
Pushed to default:
http://hg.mozilla.org/qa/mozmill-tests/rev/02342193a7d4
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
status-firefox-esr10: --- → unaffected
status-firefox16: affected → fixed
Resolution: --- → FIXED
http://hg.mozilla.org/qa/mozmill-tests/rev/5788b79ab8d0 (aurora)
http://hg.mozilla.org/qa/mozmill-tests/rev/1262f4ada889 (beta)
http://hg.mozilla.org/qa/mozmill-tests/rev/d70e8e806dd0 (release)
status-firefox13: affected → fixed
status-firefox14: affected → fixed
status-firefox15: affected → fixed
(Assignee)

Updated

5 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.