mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1184973 - Don't use https in b2g tests because of bustage, a=RyanVM
CLOSED TREE
This commit is contained in:
parent
ec9e5103e2
commit
9dbb6e3bfe
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>frame for storage allowed test</title>
|
||||
|
||||
<script type="text/javascript" src="https://example.com/tests/dom/tests/mochitest/general/storagePermissionsUtils.js"></script>
|
||||
<script type="text/javascript" src="//example.com/tests/dom/tests/mochitest/general/storagePermissionsUtils.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
task(function* () {
|
||||
|
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>frame for storage allowed test</title>
|
||||
|
||||
<script type="text/javascript" src="https://example.com/tests/dom/tests/mochitest/general/storagePermissionsUtils.js"></script>
|
||||
<script type="text/javascript" src="//example.com/tests/dom/tests/mochitest/general/storagePermissionsUtils.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
task(function* () {
|
||||
|
@ -27,6 +27,9 @@ function handleRequest(request, response) {
|
||||
data += str.value;
|
||||
} while (read != 0);
|
||||
|
||||
// No scheme is provided in data URIs, so explicitly provide one
|
||||
data = data.replace('//example.com', 'http://example.com');
|
||||
|
||||
// Write out the file as a data: URI, and redirect to it
|
||||
response.setStatusLine('1.1', 302, 'Found');
|
||||
response.setHeader('Location', 'data:text/html,' + encodeURIComponent(data) + "#nullprincipal");
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>frame for storage prevented test</title>
|
||||
|
||||
<script type="text/javascript" src="https://example.com/tests/dom/tests/mochitest/general/storagePermissionsUtils.js"></script>
|
||||
<script type="text/javascript" src="//example.com/tests/dom/tests/mochitest/general/storagePermissionsUtils.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
task(function* () {
|
||||
|
@ -230,3 +230,27 @@ function task(fn) {
|
||||
}
|
||||
|
||||
var thirdparty = "https://example.com/tests/dom/tests/mochitest/general/";
|
||||
|
||||
// XXX B2G HACK
|
||||
|
||||
var b2gOnly = (function() {
|
||||
function pref(name) {
|
||||
try {
|
||||
return SpecialPowers.getBoolPref(name);
|
||||
} catch (e) {
|
||||
// Out of an over-abundance of caution, don't use https
|
||||
// if we can't check the pref
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
var isAndroid = !!navigator.userAgent.includes("Android");
|
||||
var isMulet = pref("b2g.is_mulet");
|
||||
var isB2g = isMulet || (!isAndroid && /Mobile|Tablet/.test(navigator.userAgent));
|
||||
return isB2g ? true : undefined;
|
||||
})();
|
||||
|
||||
// Switch to http:// in b2g because https:// in tests isn't supported
|
||||
if (b2gOnly) {
|
||||
thirdparty = "http://example.com/tests/dom/tests/mochitest/general/";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user