Backed out changeset 4e2d53d22566 (bug 1347503) for crashes in windows a11y tests
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 23 Mar 2017 09:15:29 +0100
changeset 349020 5e304691d84bb0caab48ac16a229309592f1be3a
parent 349019 d307e9e3d791c9a6f240629daf8959d213951521
child 349021 0837622d710538d3ff099531d5ddd137c0e7f159
push id39382
push usercbook@mozilla.com
push dateThu, 23 Mar 2017 08:15:45 +0000
treeherderautoland@5e304691d84b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1347503
milestone55.0a1
backs out4e2d53d22566a45c5402c4f0785d5fbc5628f92a
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 4e2d53d22566 (bug 1347503) for crashes in windows a11y tests
browser/modules/PermissionUI.jsm
browser/modules/test/browser/browser_PermissionUI.js
--- a/browser/modules/PermissionUI.jsm
+++ b/browser/modules/PermissionUI.jsm
@@ -346,20 +346,16 @@ this.PermissionPromptPrototype = {
     let options = this.popupOptions;
 
     if (!options.hasOwnProperty("displayURI") || options.displayURI) {
       options.displayURI = this.principal.URI;
     }
     // Permission prompts are always persistent; the close button is controlled by a pref.
     options.persistent = true;
     options.hideClose = !Services.prefs.getBoolPref("privacy.permissionPrompts.showCloseButton");
-    // When the docshell of the browser is aboout to be swapped to another one,
-    // the "swapping" event is called. Returning true causes the notification
-    // to be moved to the new browser.
-    options.eventCallback = topic => topic == "swapping";
 
     this.onBeforeShow();
     chromeWin.PopupNotifications.show(this.browser,
                                       this.notificationID,
                                       this.message,
                                       this.anchorID,
                                       mainAction,
                                       secondaryActions,
--- a/browser/modules/test/browser/browser_PermissionUI.js
+++ b/browser/modules/test/browser/browser_PermissionUI.js
@@ -392,77 +392,8 @@ add_task(function* test_no_request() {
     TestPrompt.prompt();
     yield shownPromise;
 
     // Next test allowing the permission request.
     yield clickMainAction();
     Assert.ok(allowed, "The mainAction callback should have fired");
   });
 });
-
-/**
- * Tests that when the tab is moved to a different window, the notification
- * is transferred to the new window.
- */
-add_task(function* test_window_swap() {
-  yield BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: "http://example.com",
-  }, function*(browser) {
-    const kTestNotificationID = "test-notification";
-    const kTestMessage = "Test message";
-
-    let mainAction = {
-      label: "Test action",
-      accessKey: "T",
-    };
-    let secondaryAction = {
-      label: "Secondary",
-      accessKey: "S",
-    };
-
-    let mockRequest = makeMockPermissionRequest(browser);
-
-    let TestPrompt = {
-      __proto__: PermissionUI.PermissionPromptForRequestPrototype,
-      request: mockRequest,
-      notificationID: kTestNotificationID,
-      message: kTestMessage,
-      promptActions: [mainAction, secondaryAction],
-    };
-
-    let shownPromise =
-      BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown");
-    TestPrompt.prompt();
-    yield shownPromise;
-
-    let newWindowOpened = BrowserTestUtils.waitForNewWindow();
-    gBrowser.replaceTabWithWindow(gBrowser.selectedTab);
-    let newWindow = yield newWindowOpened;
-    shownPromise =
-      BrowserTestUtils.waitForEvent(newWindow.PopupNotifications.panel, "popupshown");
-    TestPrompt.prompt();
-    yield shownPromise;
-
-    let notification =
-      newWindow.PopupNotifications.getNotification(kTestNotificationID,
-                                                   newWindow.gBrowser.selectedBrowser);
-    Assert.ok(notification, "Should have gotten the notification");
-
-    Assert.equal(notification.message, kTestMessage,
-                 "Should be showing the right message");
-    Assert.equal(notification.mainAction.label, mainAction.label,
-                 "The main action should have the right label");
-    Assert.equal(notification.mainAction.accessKey, mainAction.accessKey,
-                 "The main action should have the right access key");
-    Assert.equal(notification.secondaryActions.length, 1,
-                 "There should only be 1 secondary action");
-    Assert.equal(notification.secondaryActions[0].label, secondaryAction.label,
-                 "The secondary action should have the right label");
-    Assert.equal(notification.secondaryActions[0].accessKey,
-                 secondaryAction.accessKey,
-                 "The secondary action should have the right access key");
-    Assert.ok(notification.options.displayURI.equals(mockRequest.principal.URI),
-              "Should be showing the URI of the requesting page");
-
-    yield BrowserTestUtils.closeWindow(newWindow);
-  });
-});