Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 764807 - Failure in testAddons_RestartlessExtensionWorksAfterRestart if using about:newtab
: Failure in testAddons_RestartlessExtensionWorksAfterRestart if using about:ne...
Product: Mozilla QA
Classification: Other
Component: Mozmill Tests (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Remus Pop (:RemusPop)
Depends on:
Blocks: 764782
  Show dependency treegraph
Reported: 2012-06-14 07:04 PDT by Remus Pop (:RemusPop)
Modified: 2012-06-21 01:07 PDT (History)
2 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

patch v1 (all branches) (2.37 KB, patch)
2012-06-15 07:09 PDT, Remus Pop (:RemusPop)
hskupin: review+
Details | Diff | Splinter Review

Description Remus Pop (:RemusPop) 2012-06-14 07:04:11 PDT
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.
Comment 1 Henrik Skupin (:whimboo) 2012-06-15 01:49:30 PDT
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 Remus Pop (:RemusPop) 2012-06-15 02:04:50 PDT
So are we safe using open("about:blank") before right clicking?
Comment 3 Henrik Skupin (:whimboo) 2012-06-15 02:06:25 PDT
Not sure what you mean by that comment. But about:blank will work, yes.
Comment 4 Alex Lakatos[:AlexLakatos] 2012-06-15 02:08:48 PDT
(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?
Comment 5 Henrik Skupin (:whimboo) 2012-06-15 02:18:59 PDT
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 Remus Pop (:RemusPop) 2012-06-15 07:09:12 PDT
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).
Comment 7 Henrik Skupin (:whimboo) 2012-06-18 03:51:57 PDT
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();
Comment 8 Henrik Skupin (:whimboo) 2012-06-18 03:53:50 PDT
Pushed to default:

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