# HG changeset patch # Parent e1a037c085d13e5ac044e5385a23f701460ed27f # User Shian-Yow Wu Test case. diff --git a/content/base/test/file_bug1037358_worker.js b/content/base/test/file_bug1037358_worker.js new file mode 100644 --- /dev/null +++ b/content/base/test/file_bug1037358_worker.js @@ -0,0 +1,32 @@ +/** + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +var gJar = "jar:http://example.org/tests/content/base/test/file_bug945152.jar!/data_1.txt"; + +self.onmessage = function onmessage(event) { + + var xhr = new XMLHttpRequest({mozAnon: true, mozSystem: true}); + var count = 0; + + xhr.onerror = function(e) { + ok(false, "Error: " + e.error + "\n"); + }; + + function read_ab() { + var xhr = new XMLHttpRequest({mozAnon: true, mozSystem: true}); + xhr.open("GET", gJar, false); + xhr.responseType = "arraybuffer"; + xhr.send(); + count++; + dump("====== count=" + count + "\n"); + if (count == 160000) { + postMessage({type: "finish" }); + } else { + setTimeout(read_ab, (count % 5000) == 1 ? 15000 : 0); + } + } + + read_ab(); +}; diff --git a/content/base/test/mochitest.ini b/content/base/test/mochitest.ini --- a/content/base/test/mochitest.ini +++ b/content/base/test/mochitest.ini @@ -138,16 +138,17 @@ support-files = file_bug869432.eventsource file_bug869432.eventsource^headers^ file_bug902350.html file_bug902350_frame.html file_bug907892.html file_bug945152.jar file_bug945152_worker.js file_bug1008126_worker.js + file_bug1037358_worker.js file_general_document.html file_html_in_xhr.html file_html_in_xhr.sjs file_html_in_xhr2.html file_html_in_xhr3.html file_htmlserializer_1.html file_htmlserializer_1_bodyonly.html file_htmlserializer_1_format.html @@ -552,16 +553,18 @@ skip-if = buildapp == 'b2g' || toolkit = [test_bug902847.html] [test_bug907892.html] [test_bug922681.html] [test_bug927196.html] [test_bug945152.html] run-if = os == 'linux' [test_bug1008126.html] run-if = os == 'linux' +[test_bug1037358.html] +run-if = os == 'linux' [test_caretPositionFromPoint.html] [test_classList.html] # This test fails on the Mac for some reason [test_copyimage.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit != 'gtk2' && toolkit != 'gtk3' && toolkit != 'windows' || e10s #b2g-desktop(Bug 931116, b2g desktop specific, initial triage) [test_copypaste.html] skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #bug 904183 # b2g(clipboard undefined) b2g-debug(clipboard undefined) b2g-desktop(clipboard undefined) [test_copypaste.xhtml] diff --git a/content/base/test/test_bug1037358.html b/content/base/test/test_bug1037358.html new file mode 100644 --- /dev/null +++ b/content/base/test/test_bug1037358.html @@ -0,0 +1,55 @@ + + + + + + + Test for Bug 1037358 + + + + +Mozilla Bug 1037358 +

+ +
+
+
+ +