Closed Bug 764807 Opened 12 years ago Closed 12 years ago

Failure in testAddons_RestartlessExtensionWorksAfterRestart if using about:newtab

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

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

VERIFIED FIXED
Tracking Status
firefox13 --- fixed
firefox14 --- fixed
firefox15 --- fixed
firefox16 --- fixed
firefox-esr10 --- unaffected

People

(Reporter: remus.pop, Assigned: remus.pop)

References

Details

Attachments

(1 file)

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.
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.
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)
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
Closed: 12 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: