import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo

This commit is contained in:
Roy Tam 2018-01-19 03:59:58 +08:00
commit dcd9973243
150858 changed files with 23884658 additions and 0 deletions

View file

@ -0,0 +1,6 @@
<!doctype html>
<html>
<meta charset="utf-8">
<img src="/images/green.png">
<img src="/images/green.png">
</html>

View file

@ -0,0 +1,27 @@
<!doctype html>
<html id="doc" class="reftest-wait">
<meta charset="utf-8">
<link rel="match" href="basic-auth-cache-test-ref.html">
<img id="auth" onload="loadNoAuth()">
<img id="noauth" onload="removeWait()">
<script type="text/javascript">
function loadAuth() {
var authUrl = 'http://testuser:testpass@' + window.location.host + '/http/resources/securedimage.py';
document.getElementById('auth').src = authUrl;
}
function loadNoAuth() {
var noAuthUrl = 'http://' + window.location.host + '/http/resources/securedimage.py';
document.getElementById('noauth').src = noAuthUrl;
}
function removeWait() {
document.getElementById('doc').className = "";
}
window.onload = loadAuth;
</script>
</html>

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<!-- CAUTION: if updating this test also update the expected content-length in the .headers file -->
<title>Content-Length Test</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
onload = function() {
assert_equals(document.body.textContent, "PASS");
done();
}
</script>
<body>PASS
but FAIL if this is in the body.

View file

@ -0,0 +1 @@
Content-Length: 373

View file

@ -0,0 +1,17 @@
# -*- coding: utf-8 -
def main(request, response):
image_url = str.replace(request.url, "http/resources/securedimage.py", "images/green.png")
if "authorization" not in request.headers:
response.status = 401
response.headers.set("WWW-Authenticate", "Basic")
return response
else:
auth = request.headers.get("Authorization")
if auth != "Basic dGVzdHVzZXI6dGVzdHBhc3M=":
response.set_error(403, "Invalid username or password - " + auth)
return response
response.status = 301
response.headers.set("Location", image_url)