From fe2ff1c91077aacfd4efa03362fc973421b92948 Mon Sep 17 00:00:00 2001 From: Tom Schuster Date: Fri, 7 Dec 2012 16:59:13 +0100 Subject: [PATCH] Bug 676619 - Modified test case for https. r=smaug --- browser/base/content/test/browser_bug676619.js | 17 ++++++++++++++--- browser/base/content/test/download_page.html | 4 ++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/browser/base/content/test/browser_bug676619.js b/browser/base/content/test/browser_bug676619.js index eadb98df487..647ec2495f1 100644 --- a/browser/base/content/test/browser_bug676619.js +++ b/browser/base/content/test/browser_bug676619.js @@ -1,8 +1,13 @@ function test () { waitForExplicitFinish(); + + var isHTTPS = false; + gBrowser.selectedTab = gBrowser.addTab(); gBrowser.selectedBrowser.addEventListener("load", function () { - gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true); + if (isHTTPS) { + gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true); + } let doc = gBrowser.contentDocument; @@ -34,8 +39,14 @@ function test () { testLink.bind(null, "link6", "test.blob", testLocation.bind(null, "link7", "http://example.com/", function () { - gBrowser.removeCurrentTab(); - finish(); + if (isHTTPS) { + gBrowser.removeCurrentTab(); + finish(); + } else { + // same test again with https: + isHTTPS = true; + content.location = "https://example.com:443/browser/browser/base/content/test/download_page.html"; + } }))))))); }, true); diff --git a/browser/base/content/test/download_page.html b/browser/base/content/test/download_page.html index 526b298a949..3f5c34d3d7d 100644 --- a/browser/base/content/test/download_page.html +++ b/browser/base/content/test/download_page.html @@ -13,9 +13,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=676619