Bug 1499136 - Disable dom.xhr.standard_content_type_normalization for now due to webcompat issues; r=hsivonen
Disable dom.xhr.standard_content_type_normalization for now due to webcompat issues
Differential Revision:
https://phabricator.services.mozilla.com/D8789
--- a/dom/xhr/tests/test_XHRSendData.html
+++ b/dom/xhr/tests/test_XHRSendData.html
@@ -3,17 +3,17 @@
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=464848
-->
<head>
<title>XMLHttpRequest send data and headers</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
-<body onload="createFiles();">
+<body onload="setupAndRunTests();">
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=464848">Mozilla Bug 464848</a>
<p id="display">
</p>
<div id="content" style="display: none">
</div>
<pre id="test">
@@ -21,16 +21,24 @@ https://bugzilla.mozilla.org/show_bug.cg
SimpleTest.waitForExplicitFinish();
var testData = "blahblahblahblahblahblahblaaaaaaaah. blah.";
var extensions = [".txt",".png",".jpg",".gif",".xml", "noext"];
var fileTypes = ["text/plain", "image/png", "image/jpeg", "image/gif", "text/xml", null];
var gen;
var testDOMFiles;
+function setupAndRunTests() {
+ SpecialPowers.pushPrefEnv({set: [["dom.xhr.standard_content_type_normalization", true]]},
+ function() {
+ gen = runTests();
+ createFiles();
+ });
+}
+
function createFiles() {
var filesToCreate = new Array();
extensions.forEach(function (extension) {
filesToCreate.push({name: "testfile" + extension, data: testData});
});
SpecialPowers.createFiles(filesToCreate,
function (files) {
testDOMFiles = files;
@@ -254,17 +262,12 @@ function is_identical_arraybuffer(ab1, a
u8v1 = new Uint8Array(ab1);
u8v2 = new Uint8Array(ab2);
is(String.fromCharCode.apply(String, u8v1),
String.fromCharCode.apply(String, u8v2), "arraybuffer values not equal");
}
SimpleTest.finish();
} /* runTests */
-
-SpecialPowers.pushPrefEnv({set: [["dom.xhr.standard_content_type_normalization", true]]},
-function() {
- gen = runTests();
-});
</script>
</pre>
</body>
</html>
--- a/modules/libpref/init/StaticPrefList.h
+++ b/modules/libpref/init/StaticPrefList.h
@@ -418,20 +418,21 @@ VARCACHE_PREF(
VARCACHE_PREF(
"dom.worker.canceling.timeoutMilliseconds",
dom_worker_canceling_timeoutMilliseconds,
RelaxedAtomicUint32, 30000 /* 30 seconds */
)
// Enable content type normalization of XHR uploads via MIME Sniffing standard
+// Disabled for now in bz1499136
VARCACHE_PREF(
"dom.xhr.standard_content_type_normalization",
dom_xhr_standard_content_type_normalization,
- RelaxedAtomicBool, true
+ RelaxedAtomicBool, false
)
//---------------------------------------------------------------------------
// Clear-Site-Data prefs
//---------------------------------------------------------------------------
VARCACHE_PREF(
"dom.clearSiteData.enabled",