diff --git a/browser/base/content/test/general/browser_mixedcontent_securityflags.js b/browser/base/content/test/general/browser_mixedcontent_securityflags.js index 853a71205cf..043018d208b 100644 --- a/browser/base/content/test/general/browser_mixedcontent_securityflags.js +++ b/browser/base/content/test/general/browser_mixedcontent_securityflags.js @@ -43,6 +43,10 @@ function overrideMCB() ok(notification, "Mixed Content Doorhanger should appear"); notification.reshow(); ok(PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked"); + + // Make sure the notification has no mixedblockdisabled attribute + ok(!PopupNotifications.panel.firstChild.hasAttribute("mixedblockdisabled"), + "Doorhanger must have no mixedblockdisabled attribute"); // Click on the doorhanger to allow mixed content (and reload page) PopupNotifications.panel.firstChild.disableMixedContentProtection(); notification.remove(); @@ -56,6 +60,15 @@ function mixedContentOverrideTest() is(gTestBrowser.docShell.hasMixedActiveContentLoaded, true, "hasMixedActiveContentLoaded flag has not been set"); is(gTestBrowser.docShell.hasMixedDisplayContentBlocked, false, "second hasMixedDisplayContentBlocked flag has been set"); is(gTestBrowser.docShell.hasMixedActiveContentBlocked, false, "second hasMixedActiveContentBlocked flag has been set"); + + let notification = PopupNotifications.getNotification("bad-content", gTestBrowser); + ok(notification, "Mixed Content Doorhanger should appear"); + notification.reshow(); + + // Make sure the notification has the mixedblockdisabled attribute set to true + is(PopupNotifications.panel.firstChild.getAttribute("mixedblockdisabled"), "true", + "Doorhanger must have [mixedblockdisabled='true'] attribute"); + gBrowser.removeCurrentTab(); finish(); } diff --git a/browser/base/content/test/general/browser_trackingUI.js b/browser/base/content/test/general/browser_trackingUI.js index 01465085c89..5528357dfbf 100644 --- a/browser/base/content/test/general/browser_trackingUI.js +++ b/browser/base/content/test/general/browser_trackingUI.js @@ -68,6 +68,10 @@ function testTrackingPage(gTestBrowser) isnot(PopupNotifications.panel.firstChild.isTrackingContentBlocked, 0, "Tracking Content is being blocked"); + // Make sure the notification has no trackingblockdisabled attribute + ok(!PopupNotifications.panel.firstChild.hasAttribute("trackingblockdisabled"), + "Doorhanger must have no trackingblockdisabled attribute"); + // Disable Tracking Content Protection for the page (which reloads the page) PopupNotifications.panel.firstChild.disableTrackingContentProtection(); } @@ -81,6 +85,10 @@ function testTrackingPageWhitelisted(gTestBrowser) // Make sure the state of the doorhanger does NOT include blocking tracking elements is(PopupNotifications.panel.firstChild.isTrackingContentBlocked, 0, "Tracking Content is NOT being blocked"); + + // Make sure the notification has the trackingblockdisabled attribute set to true + is(PopupNotifications.panel.firstChild.getAttribute("trackingblockdisabled"), "true", + "Doorhanger must have [trackingblockdisabled='true'] attribute"); } function testTrackingPageOFF(gTestBrowser)