Bug 1043803: checkIdentity following onSecurityChange now shows doorhanger on STATE_LOADED_MIXED_ACTIVE_CONTENT. Doorhanger now acknowledges this new state. r=adw

This commit is contained in:
Georgios Kontaxis 2014-08-22 20:26:03 -07:00
parent 937ebf1ae6
commit 8670ec571e
21 changed files with 189 additions and 57 deletions

View File

@ -6485,9 +6485,14 @@ var gIdentityHandler = {
this.setMode(this.IDENTITY_MODE_UNKNOWN);
}
// Ensure the doorhanger is shown when mixed active content is blocked.
if (state & nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT)
// Show the doorhanger when:
// - mixed active content is blocked
// - mixed active content is loaded (detected but not blocked)
if (state &
(nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT |
nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT)) {
this.showBadContentDoorhanger(state);
}
},
showBadContentDoorhanger : function(state) {
@ -6495,7 +6500,7 @@ var gIdentityHandler = {
PopupNotifications.getNotification("bad-content",
gBrowser.selectedBrowser);
// If we've already got an active notification, bail out to avoid showing it repeatedly.
// Avoid showing the same notification (same state) repeatedly.
if (currentNotification && currentNotification.options.state == state)
return;
@ -6505,9 +6510,15 @@ var gIdentityHandler = {
state: state
};
// default
let iconState = "bad-content-blocked-notification-icon";
if (state & Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT) {
iconState = "bad-content-unblocked-notification-icon";
}
PopupNotifications.show(gBrowser.selectedBrowser, "bad-content",
"", "bad-content-blocked-notification-icon",
null, null, options);
"", iconState, null, null, options);
},
/**

View File

@ -725,6 +725,7 @@
<image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="plugin-install-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="bad-content-blocked-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="bad-content-unblocked-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="webRTC-shareMicrophone-notification-icon" class="notification-anchor-icon" role="button"/>

View File

@ -53,6 +53,7 @@ function MixedTest1A() {
var notification = PopupNotifications.getNotification("bad-content", gTestBrowser);
ok(notification, "Mixed Content Doorhanger did appear");
notification.reshow();
ok(PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked");
PopupNotifications.panel.firstChild.disableMixedContentProtection();
}
function MixedTest1B() {
@ -90,6 +91,7 @@ function MixedTest3A() {
var notification = PopupNotifications.getNotification("bad-content", gTestBrowser);
ok(notification, "Mixed Content Doorhanger did appear for test 3");
notification.reshow();
ok(PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in test 3");
PopupNotifications.panel.firstChild.disableMixedContentProtection();
}
function MixedTest3B() {
@ -117,6 +119,7 @@ function MixedTest4A() {
var notification = PopupNotifications.getNotification("bad-content", gTestBrowser);
ok(notification, "Mixed Content Doorhanger did appear for Test 4");
notification.reshow();
ok(PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in Test 4");
PopupNotifications.panel.firstChild.disableMixedContentProtection();
}
function MixedTest4B() {
@ -126,6 +129,9 @@ function MixedTest4C() {
ok(content.document.location == gHttpTestRoot + "file_bug822367_4B.html", "Location didn't change in test 4");
var notification = PopupNotifications.getNotification("bad-content", gTestBrowser);
ok(notification, "Mixed Content Doorhanger did appear after location change in Test 4");
notification.reshow();
ok(PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in test 4");
notification.remove();
waitForCondition(function() content.document.getElementById('p1').innerHTML == "", MixedTest4D, "Mixed script loaded in test 4 after location change!");
}
function MixedTest4D() {
@ -146,6 +152,7 @@ function MixedTest5A() {
var notification = PopupNotifications.getNotification("bad-content", gTestBrowser);
ok(notification, "Mixed Content Doorhanger did appear for Test 5");
notification.reshow();
ok(PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in Test 5");
PopupNotifications.panel.firstChild.disableMixedContentProtection();
}
function MixedTest5B() {
@ -173,6 +180,7 @@ function MixedTest6B() {
ok(notification, "Mixed Content Doorhanger did appear for Test 6");
gTestBrowser.addEventListener("load", MixedTest6C, true);
notification.reshow();
ok(PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in Test 6");
PopupNotifications.panel.firstChild.disableMixedContentProtection();
}

View File

@ -51,11 +51,13 @@ function test1A() {
gTestBrowser.addEventListener("load", test1B, true);
var notification = PopupNotifications.getNotification("bad-content", gTestBrowser);
ok(notification, "OK: Mixed Content Doorhanger appeared in Test1A!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test1A!");
notification.reshow();
ok(PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in Test1A!");
// Disable Mixed Content Protection for the page (and reload)
notification.reshow();
PopupNotifications.panel.firstChild.disableMixedContentProtection();
notification.remove();
}
function test1B() {
@ -81,10 +83,13 @@ function test1C() {
function test1D() {
gTestBrowser.removeEventListener("load", test1D, true);
// The Doorhanger should not appear, because our decision of disabling the
// mixed content blocker is persistent.
// The Doorhanger should appear but isMixedContentBlocked should be NOT true,
// because our decision of disabling the mixed content blocker is persistent.
var notification = PopupNotifications.getNotification("bad-content", gTestBrowser);
ok(!notification, "OK: Mixed Content Doorhanger did not appear again in Test1D!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test1D!");
notification.reshow();
ok(!PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is NOT being blocked in Test1D!");
notification.remove();
var actual = content.document.getElementById('mctestdiv').innerHTML;
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 1D");
@ -108,11 +113,13 @@ function test2A() {
gTestBrowser.addEventListener("load", test2B, true);
var notification = PopupNotifications.getNotification("bad-content", gTestBrowser);
ok(notification, "OK: Mixed Content Doorhanger appeared in Test 2A!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 2A!");
notification.reshow();
ok(PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in Test 2A!");
// Disable Mixed Content Protection for the page (and reload)
notification.reshow();
PopupNotifications.panel.firstChild.disableMixedContentProtection();
notification.remove();
}
function test2B() {
@ -139,10 +146,13 @@ function test2C() {
function test2D() {
gTestBrowser.removeEventListener("load", test2D, true);
// The Doorhanger should not appear, because our decision of disabling the
// mixed content blocker is persistent.
// The Doorhanger should appear but isMixedContentBlocked should be NOT true,
// because our decision of disabling the mixed content blocker is persistent.
var notification = PopupNotifications.getNotification("bad-content", gTestBrowser);
ok(!notification, "OK: Mixed Content Doorhanger did not appear again in Test2D!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test2D!");
notification.reshow();
ok(!PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is NOT being blocked");
notification.remove();
var actual = content.document.getElementById('mctestdiv').innerHTML;
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 2D");
@ -165,7 +175,10 @@ function test3A() {
gTestBrowser.removeEventListener("load", test3A, true);
var notification = PopupNotifications.getNotification("bad-content", gTestBrowser);
ok(notification, "OK: Mixed Content Doorhanger appeared in Test 3A!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 3A!");
notification.reshow();
ok(PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in Test 3A");
notification.remove();
// We are done with tests, clean up
cleanUpAfterTests();

View File

@ -132,11 +132,13 @@ function checkPopUpNotification() {
gTestWin.gBrowser.addEventListener("load", reloadedTabAfterDisablingMCB, true);
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
ok(notification, "OK: Mixed Content Doorhanger appeared in " + curTestName + "!");
ok(notification, "OK: Mixed Content Doorhanger did appear in " + curTestName + "!");
notification.reshow();
ok(gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in " + curTestName + "!");
// Disable Mixed Content Protection for the page (and reload page)
notification.reshow();
gTestWin.PopupNotifications.panel.firstChild.disableMixedContentProtection();
notification.remove();
}
function reloadedTabAfterDisablingMCB() {
@ -178,10 +180,13 @@ function test1A() {
gTestWin.gBrowser.removeEventListener("load", test1A, true);
gTestWin.gBrowser.selectTabAtIndex(2);
// The Doorhanger should >> NOT << appear, because our decision of disabling the
// mixed content blocker is persistent across tabs.
// The Doorhanger should appear but isMixedContentBlocked should be >> NOT << true,
// because our decision of disabling the mixed content blocker is persistent across tabs.
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
ok(!notification, "OK: Mixed Content Doorhanger did not appear again in Test 1A!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 1A!");
notification.reshow();
ok(!gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is NOT being blocked in Test 1A!");
notification.remove();
var actual = gTestWin.content.document.getElementById('mctestdiv').innerHTML;
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 1A");
@ -204,10 +209,13 @@ function test1C() {
gTestWin.gBrowser.removeEventListener("load", test1C, true);
gTestWin.gBrowser.selectTabAtIndex(2);
// The Doorhanger should >> NOT << appear, because our decision of disabling the
// mixed content blocker is persistent across tabs.
// The Doorhanger should appear but isMixedContentBlocked should be >> NOT << true,
// because our decision of disabling the mixed content blocker is persistent across tabs.
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
ok(!notification, "OK: Mixed Content Doorhanger did not appear again in Test 1C!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 1C!");
notification.reshow();
ok(!gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is NOT being blocked in Test 1C!");
notification.remove();
var actual = gTestWin.content.document.getElementById('mctestdiv').innerHTML;
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 1C");
@ -236,10 +244,13 @@ function test2A() {
gTestWin.gBrowser.removeEventListener("load", test2A, true);
gTestWin.gBrowser.selectTabAtIndex(2);
// The Doorhanger >> SHOULD << appear, because our decision of disabling the
// mixed content blocker should only persist if pages are from the same domain.
// The Doorhanger should appear and isMixedContentBlocked should be >> TRUE <<,
// because our decision of disabling the mixed content blocker should only persist if pages are from the same domain.
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
ok(notification, "OK: Mixed Content Doorhanger did appear again in Test 2A!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 2A!");
notification.reshow();
ok(gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in Test 2A!");
notification.remove();
var actual = gTestWin.content.document.getElementById('mctestdiv').innerHTML;
is(actual, "Mixed Content Blocker enabled", "OK: Blocked mixed script in Test 2A");
@ -262,10 +273,13 @@ function test2C() {
gTestWin.gBrowser.removeEventListener("load", test2C, true);
gTestWin.gBrowser.selectTabAtIndex(2);
// The Doorhanger >> SHOULD << appear, because our decision of disabling the
// mixed content blocker should only persist if pages are from the same domain.
// The Doorhanger should appear and isMixedContentBlocked should be >> TRUE <<,
// because our decision of disabling the mixed content blocker should only persist if pages are from the same domain.
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
ok(notification, "OK: Mixed Content Doorhanger did appear again in Test 2C!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 2C!");
notification.reshow();
ok(gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in Test 2C!");
notification.remove();
var actual = gTestWin.content.document.getElementById('mctestdiv').innerHTML;
is(actual, "Mixed Content Blocker enabled", "OK: Blocked mixed script in Test 2C");
@ -300,9 +314,12 @@ function test3B() {
gTestWin.gBrowser.removeEventListener("load", test3B, true);
gTestWin.gBrowser.selectTabAtIndex(2);
// The Doorhanger should >> NOT << appear!
// The Doorhanger should appear but isMixedContentBlocked should be >> NOT << true!
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
ok(!notification, "OK: Mixed Content Doorhanger did appear again in Test 3B!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 3B!");
notification.reshow();
ok(!gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is NOT being blocked in Test 3B!");
notification.remove();
var actual = gTestWin.content.document.getElementById('mctestdiv').innerHTML;
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 3B");
@ -331,9 +348,12 @@ function test3E() {
gTestWin.gBrowser.removeEventListener("load", test3E, true);
gTestWin.gBrowser.selectTabAtIndex(2);
// The Doorhanger should >> NOT << appear!
// The Doorhanger should appear but isMixedContentBlocked should be >> NOT << true!
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
ok(!notification, "OK: Mixed Content Doorhanger did appear again in Test 3E!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 3E!");
notification.reshow();
ok(!gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is NOT being blocked in Test 3E!");
notification.remove();
var actual = gTestWin.content.document.getElementById('mctestdiv').innerHTML;
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 3E");
@ -368,9 +388,12 @@ function test4B() {
gTestWin.gBrowser.removeEventListener("load", test4B, true);
gTestWin.gBrowser.selectTabAtIndex(2);
// The Doorhanger >> SHOULD << appear!
// The Doorhanger should appear and isMixedContentBlocked should be >> TRUE <<
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
ok(notification, "OK: Mixed Content Doorhanger did appear again in Test 4B!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 4B!");
notification.reshow();
ok(gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in Test 4B!");
notification.remove();
var actual = gTestWin.content.document.getElementById('mctestdiv').innerHTML;
is(actual, "Mixed Content Blocker enabled", "OK: Blocked mixed script in Test 4B");
@ -399,9 +422,12 @@ function test4E() {
gTestWin.gBrowser.removeEventListener("load", test4E, true);
gTestWin.gBrowser.selectTabAtIndex(2);
// The Doorhanger >> SHOULD << appear!
// The Doorhanger should appear and isMixedContentBlocked should be >> TRUE <<
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
ok(notification, "OK: Mixed Content Doorhanger did appear again in Test 4E!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 4E!");
notification.reshow();
ok(gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in Test 4E!");
notification.remove();
var actual = gTestWin.content.document.getElementById('mctestdiv').innerHTML;
is(actual, "Mixed Content Blocker enabled", "OK: Blocked mixed script in Test 4E");
@ -431,10 +457,13 @@ function test5A() {
gTestWin.gBrowser.removeEventListener("load", test5A, true);
gTestWin.gBrowser.selectTabAtIndex(2);
// The Doorhanger should >> NOT << appear
// Currently it >> APPEARS << - see follow up bug 914860
// The Doorhanger should appear but isMixedContentBlocked should be >> NOT << true
// Currently it is >> TRUE << - see follow up bug 914860
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
todo(!notification, "OK: Mixed Content Doorhanger did not appear again in Test 5A!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 5A!");
notification.reshow();
todo(!gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is NOT being blocked in Test 5A!");
notification.remove();
var actual = gTestWin.content.document.getElementById('mctestdiv').innerHTML;
todo_is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 5A!");
@ -458,10 +487,13 @@ function test5C() {
// move the tab again
gTestWin.gBrowser.selectTabAtIndex(2);
// The Doorhanger should >> NOT << appear
// Currently it >> APPEARS << - see follow up bug 914860
// The Doorhanger should appear but isMixedContentBlocked should be >> NOT << true
// Currently it is >> TRUE << - see follow up bug 914860
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
todo(!notification, "OK: Mixed Content Doorhanger did not appear again in Test 5C!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 5C!");
notification.reshow();
todo(!gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is NOT being blocked in Test 5C!");
notification.remove();
var actual = gTestWin.content.document.getElementById('mctestdiv').innerHTML;
todo_is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 5C!");
@ -491,9 +523,12 @@ function test6A() {
gTestWin.gBrowser.removeEventListener("load", test6A, true);
gTestWin.gBrowser.selectTabAtIndex(2);
// The Doorhanger >> SHOULD << appear!
// The Doorhanger should appear and isMixedContentBlocked should be >> TRUE <<
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
ok(notification, "OK: Mixed Content Doorhanger did appear again in Test 6A!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 6A!");
notification.reshow();
ok(gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in Test 6A!");
notification.remove();
var actual = gTestWin.content.document.getElementById('mctestdiv').innerHTML;
is(actual, "Mixed Content Blocker enabled", "OK: Blocked mixed script in Test 6A");
@ -516,9 +551,12 @@ function test6C() {
gTestWin.gBrowser.removeEventListener("load", test6C, true);
gTestWin.gBrowser.selectTabAtIndex(2);
// The Doorhanger >> SHOULD << appear!
// The Doorhanger should appear and isMixedContentBlocked should be >> TRUE <<
var notification = PopupNotifications.getNotification("bad-content", gTestWin.gBrowser.selectedBrowser);
ok(notification, "OK: Mixed Content Doorhanger did appear again in Test 6C!");
ok(notification, "OK: Mixed Content Doorhanger did appear in Test 6C!");
notification.reshow();
ok(gTestWin.PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked in Test 6C!");
notification.remove();
var actual = gTestWin.content.document.getElementById('mctestdiv').innerHTML;
is(actual, "Mixed Content Blocker enabled", "OK: Blocked mixed script in Test 6C");

View File

@ -41,9 +41,11 @@ function overrideMCB()
gTestBrowser.addEventListener("load", mixedContentOverrideTest, true);
var notification = PopupNotifications.getNotification("bad-content", gTestBrowser);
ok(notification, "Mixed Content Doorhanger should appear");
// Click on the doorhanger to allow mixed content (and reload page)
notification.reshow();
ok(PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked");
// Click on the doorhanger to allow mixed content (and reload page)
PopupNotifications.panel.firstChild.disableMixedContentProtection();
notification.remove();
}
function mixedContentOverrideTest()

View File

@ -1617,6 +1617,12 @@
</xul:menupopup>
</xul:button>
</xul:hbox>
<xul:hbox anonid="mixedContentProtectionDisabled" hidden="true"
class="popup-notification-footer" xbl:inherits="popupid">
<xul:description class="popup-notification-item-message popup-notification-item-message-critical" xbl:inherits="popupid">
&mixedContentBlocked2.disabled.message;
</xul:description>
</xul:hbox>
</xul:vbox>
</xul:vbox>
</xul:hbox>
@ -1640,10 +1646,20 @@
document.getAnonymousElementByAttribute(this, "anonid",
"mixedContentAction.unblock")
</field>
<field name="_mixedContentHelplink">
<field name="_mixedContentProtectionDisabledWarning">
document.getAnonymousElementByAttribute(this, "anonid",
"mixedContentProtectionDisabled")
</field>
<field name="_mixedContentHelpLink">
document.getAnonymousElementByAttribute(this, "anonid",
"mixedContent.helplink")
</field>
<property name="isMixedContentBlocked" readonly="true">
<getter><![CDATA[
return this.notification.options.state &
Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT;
]]></getter>
</property>
<constructor><![CDATA[
// default title
_doorhangerTitle.value =
@ -1651,13 +1667,21 @@
"badContentBlocked.notblocked.message", [this._brandShortName]);
if (this.notification.options.state &
Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT) {
Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT) {
_doorhangerTitle.value =
gNavigatorBundle.getFormattedString(
"badContentBlocked.blocked.message", [this._brandShortName]);
_mixedContent.hidden = false;
_mixedContentUnblock.hidden = false;
_mixedContentHelplink.href =
_mixedContentHelpLink.href =
Services.urlFormatter.formatURLPref("app.support.baseURL")
+ "mixed-content";
}
if (this.notification.options.state &
Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT) {
_mixedContent.hidden = false;
_mixedContentProtectionDisabledWarning.hidden = false;
_mixedContentHelpLink.href =
Services.urlFormatter.formatURLPref("app.support.baseURL")
+ "mixed-content";
}

View File

@ -57,10 +57,12 @@ function blockMixedContentTest1()
function mixedContentOverrideTest2(hud)
{
var notification = PopupNotifications.getNotification("bad-content", browser);
ok(notification, "Mixed Content Doorhanger didn't appear");
// Click on the doorhanger.
ok(notification, "Mixed Content Doorhanger did appear");
notification.reshow();
ok(PopupNotifications.panel.firstChild.isMixedContentBlocked, "OK: Mixed Content is being blocked");
// Click on the doorhanger.
PopupNotifications.panel.firstChild.disableMixedContentProtection();
notification.remove();
waitForMessages({
webconsole: hud,

View File

@ -733,6 +733,7 @@ just addresses the organization to follow, e.g. "This site is run by " -->
<!ENTITY mixedContentBlocked2.options "Options">
<!ENTITY mixedContentBlocked2.unblock.label "Disable protection for now">
<!ENTITY mixedContentBlocked2.unblock.accesskey "D">
<!ENTITY mixedContentBlocked2.disabled.message "Protection is disabled">
<!ENTITY pointerLock.notification.message "Press ESC at any time to show it again.">

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

View File

@ -1325,6 +1325,11 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
list-style-image: url(chrome://browser/skin/bad-content-blocked-16.png);
}
.bad-content-unblocked-notification-icon,
#bad-content-unblocked-notification-icon {
list-style-image: url(chrome://browser/skin/bad-content-unblocked-16.png);
}
.webRTC-shareDevices-notification-icon,
#webRTC-shareDevices-notification-icon {
list-style-image: url(chrome://browser/skin/webRTC-shareDevice-16.png);

View File

@ -42,6 +42,7 @@ browser.jar:
skin/classic/browser/menuPanel-small.png
skin/classic/browser/bad-content-blocked-16.png
skin/classic/browser/bad-content-blocked-64.png
skin/classic/browser/bad-content-unblocked-16.png
skin/classic/browser/monitor.png
skin/classic/browser/monitor_16-10.png
skin/classic/browser/notification-16.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 B

View File

@ -3567,6 +3567,15 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
}
}
#bad-content-unblocked-notification-icon {
list-style-image: url(chrome://browser/skin/bad-content-unblocked-16.png);
}
@media (min-resolution: 2dppx) {
#bad-content-unblocked-notification-icon {
list-style-image: url(chrome://browser/skin/bad-content-unblocked-16@2x.png);
}
}
.webRTC-shareDevices-notification-icon,
#webRTC-shareDevices-notification-icon {
list-style-image: url(chrome://browser/skin/webRTC-shareDevice-16.png);

View File

@ -67,6 +67,8 @@ browser.jar:
skin/classic/browser/bad-content-blocked-16@2x.png
skin/classic/browser/bad-content-blocked-64.png
skin/classic/browser/bad-content-blocked-64@2x.png
skin/classic/browser/bad-content-unblocked-16.png
skin/classic/browser/bad-content-unblocked-16@2x.png
skin/classic/browser/panel-expander-closed.png
skin/classic/browser/panel-expander-closed@2x.png
skin/classic/browser/panel-expander-open.png

View File

@ -5,3 +5,12 @@
.popup-notification-item-message[popupid="bad-content"] {
width: 17em;
}
.popup-notification-item-message-critical[popupid="bad-content"] {
color: #d74345;
font-style: italic;
}
.popup-notification-footer[popupid="bad-content"] {
padding-top: 1em;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

View File

@ -2337,6 +2337,11 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
list-style-image: url(chrome://browser/skin/bad-content-blocked-16.png);
}
.bad-content-unblocked-notification-icon,
#bad-content-unblocked-notification-icon {
list-style-image: url(chrome://browser/skin/bad-content-unblocked-16.png);
}
.webRTC-shareDevices-notification-icon,
#webRTC-shareDevices-notification-icon {
list-style-image: url(chrome://browser/skin/webRTC-shareDevice-16.png);

View File

@ -52,6 +52,7 @@ browser.jar:
skin/classic/browser/Metro_Glyph-menuPanel.png
skin/classic/browser/bad-content-blocked-16.png
skin/classic/browser/bad-content-blocked-64.png
skin/classic/browser/bad-content-unblocked-16.png
skin/classic/browser/monitor.png
skin/classic/browser/monitor_16-10.png
skin/classic/browser/notification-16.png
@ -461,6 +462,7 @@ browser.jar:
skin/classic/aero/browser/Metro_Glyph-menuPanel.png
skin/classic/aero/browser/bad-content-blocked-16.png
skin/classic/aero/browser/bad-content-blocked-64.png
skin/classic/aero/browser/bad-content-unblocked-16.png
skin/classic/aero/browser/monitor.png
skin/classic/aero/browser/monitor_16-10.png
skin/classic/aero/browser/notification-16.png

View File

@ -51,9 +51,8 @@ function MixedTest1B() {
topTarget.click();
// The link click should have caused a load and should not invoke the Mixed Content Blocker
var notification = PopupNotifications.getNotification("bad-content-blocked", gTestBrowser);
ok(!notification, "Mixed Content Doorhanger appears when trying to navigate top");
var notification = PopupNotifications.getNotification("bad-content", gTestBrowser);
ok(!notification, "Mixed Content Doorhanger did not appear when trying to navigate top");
}
function MixedTest1C() {