зеркало из https://github.com/mozilla/gecko-dev.git
Bug 676619 - Modified test case for https. r=smaug
This commit is contained in:
Родитель
4f8fac3308
Коммит
fb28b68e95
|
@ -1,8 +1,13 @@
|
||||||
function test () {
|
function test () {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
||||||
|
var isHTTPS = false;
|
||||||
|
|
||||||
gBrowser.selectedTab = gBrowser.addTab();
|
gBrowser.selectedTab = gBrowser.addTab();
|
||||||
gBrowser.selectedBrowser.addEventListener("load", function () {
|
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;
|
let doc = gBrowser.contentDocument;
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,8 +39,14 @@ function test () {
|
||||||
testLink.bind(null, "link6", "test.blob",
|
testLink.bind(null, "link6", "test.blob",
|
||||||
testLocation.bind(null, "link7", "http://example.com/",
|
testLocation.bind(null, "link7", "http://example.com/",
|
||||||
function () {
|
function () {
|
||||||
gBrowser.removeCurrentTab();
|
if (isHTTPS) {
|
||||||
finish();
|
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);
|
}, true);
|
||||||
|
|
|
@ -13,9 +13,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=676619
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="data:text/plain,Hey What are you looking for?"
|
<li><a href="data:text/plain,Hey What are you looking for?"
|
||||||
download="test.txt" id="link1">Download "test.txt"</a></li>
|
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>
|
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>
|
download="just some video" id="link3">Download "just some video"</a></li>
|
||||||
<li><a href="data:text/plain,test"
|
<li><a href="data:text/plain,test"
|
||||||
download="with-target.txt" id="link4">Download "with-target.txt"</a></li>
|
download="with-target.txt" id="link4">Download "with-target.txt"</a></li>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче