Bug 676619 - Modified test case for https. r=smaug

This commit is contained in:
Tom Schuster 2012-12-07 16:59:13 +01:00
Родитель 4f8fac3308
Коммит fb28b68e95
2 изменённых файлов: 16 добавлений и 5 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -13,9 +13,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=676619
<ul>
<li><a href="data:text/plain,Hey What are you looking for?"
download="test.txt" id="link1">Download "test.txt"</a></li>
<li><a href="http://mochi.test:8888/browser/browser/base/content/test/video.ogg"
<li><a href="video.ogg"
download id="link2">Download "video.ogg"</a></li>
<li><a href="http://mochi.test:8888/browser/browser/base/content/test/video.ogg"
<li><a href="video.ogg"
download="just some video" id="link3">Download "just some video"</a></li>
<li><a href="data:text/plain,test"
download="with-target.txt" id="link4">Download "with-target.txt"</a></li>