Bug 1427726 - move test for bug 1063538 away from jar URIs, r=baku

Bug 1063538 was reported with a testcase that accesses a .jsp, which
in turn sleeps "forever". The testcase seems to be simulating this by
using a jar:http: URI for a really big file contained in some other
directory.

Instead, we can just use a .sjs file that does a similar thing to the
original jsp file in the reporter's testcase, which conveniently also
allows us to remove dependencies on support files in other directories.

MozReview-Commit-ID: 2JCOS9VLgVv

--HG--
extra : rebase_source : 90245a05d197c9578d0b5278a247216c95f48c68
This commit is contained in:
Gijs Kruitbosch 2018-04-09 10:08:33 +01:00
Родитель a854279b1d
Коммит f6a1608dd1
5 изменённых файлов: 9 добавлений и 7 удалений

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

@ -5,7 +5,6 @@ support-files =
frame_script.js
head.js
!/dom/base/test/file_empty.html
!/dom/base/test/file_bug945152.jar
[browser_bug1047663.js]
[browser_bug1104623.js]

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

@ -0,0 +1,6 @@
function handleRequest(request, response) {
response.processAsync();
response.write("Hello");
setTimeout(function() { response.finish(); }, 100000); // wait 100 seconds.
}

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

@ -3,7 +3,7 @@
* http://creativecommons.org/publicdomain/zero/1.0/
*/
var gJar = "jar:http://example.org/tests/dom/base/test/file_bug945152.jar!/data_big.txt";
var gURL = "http://example.org/tests/dom/workers/test/bug1063538.sjs";
var xhr = new XMLHttpRequest({mozAnon: true, mozSystem: true});
var progressFired = false;
@ -20,6 +20,6 @@ xhr.onprogress = function(e) {
};
onmessage = function(e) {
xhr.open("GET", gJar, true);
xhr.open("GET", gURL, true);
xhr.send();
}

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

@ -94,7 +94,6 @@ support-files =
script_createFile.js
worker_suspended.js
window_suspended.html
!/dom/base/test/file_bug945152.jar
!/dom/notification/test/mochitest/MockServices.js
!/dom/notification/test/mochitest/NotificationTest.js
!/dom/xhr/tests/relativeLoad_import.js

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

@ -38,10 +38,8 @@ function runTest() {
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
SpecialPowers.pushPrefEnv({"set": [["network.jar.block-remote-files", false]]}, function() {
SpecialPowers.pushPermissions([{'type': 'systemXHR', 'allow': true, 'context': document}], runTest);
});
});
</script>
</pre>