mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
|
|
@ -0,0 +1,35 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Documents without browsing contexts should not load stylesheets</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/utils.js"></script>
|
||||
<body>
|
||||
<script>
|
||||
function count(id, t) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'stylesheet.py?count=1&id=' + id);
|
||||
xhr.onload = t.step_func_done(function() {
|
||||
assert_equals(xhr.responseText, "1");
|
||||
});
|
||||
xhr.onerror = t.unreached_func();
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
async_test(function(t) {
|
||||
var id = token();
|
||||
var doc = (new DOMParser()).parseFromString('<link rel="stylesheet" href="stylesheet.py?id=' + id + '"></link>', 'text/html');
|
||||
var link = doc.querySelector('link');
|
||||
document.head.appendChild(link);
|
||||
t.step_timeout(function() { count(id, t) }, 500);
|
||||
}, 'Create a document, adopt the node');
|
||||
|
||||
async_test(function(t) {
|
||||
var id = token();
|
||||
var d = document.createElement('div');
|
||||
document.body.appendChild(d);
|
||||
d.innerHTML = '<link rel="stylesheet" href="stylesheet.py?id=' + id + '"></link>';
|
||||
t.step_timeout(function() { count(id, t) }, 500);
|
||||
}, 'Create a stylesheet in innerHTML document');
|
||||
</script>
|
||||
</body>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Josh Matthews" href="mailto:josh@joshmatthews.net">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-link-element">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link href="style.css?pipe=trickle(d3)" rel="stylesheet" id="style_test"></link>
|
||||
<script>
|
||||
var saw_link_onload = false;
|
||||
var t = async_test("Check if the stylesheet's load event blocks the document load event");
|
||||
document.getElementById('style_test').onload = t.step_func(function() {
|
||||
saw_link_onload = true;
|
||||
});
|
||||
window.addEventListener('load', t.step_func_done(function() {
|
||||
assert_true(saw_link_onload);
|
||||
}));
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<title>link.relList: non-string contains</title>
|
||||
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-link-element">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#domtokenlist">
|
||||
<link rel="help" href="https://heycam.github.io/webidl/#ecmascript-binding">
|
||||
<link rel="help" href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf#page=57">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link id="link" rel="undefined null 0 NaN Infinity">
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var list = document.getElementById("link").relList;
|
||||
assert_equals(list.contains(undefined), true); //"undefined"
|
||||
assert_equals(list.contains(null), true); //"null"
|
||||
assert_equals(list.contains(-0), true); //"0"
|
||||
assert_equals(list.contains(+0), true); //"0"
|
||||
assert_equals(list.contains(NaN), true); //"NaN"
|
||||
assert_equals(list.contains(+Infinity), true); //"Infinity"
|
||||
assert_equals(list.contains(-Infinity), false); //"-Infinity"
|
||||
assert_equals(list.supports("stylesheet"), true);
|
||||
assert_equals(list.supports("nosuchrelvalueever"), false);
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<title>link: error events</title>
|
||||
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-link-element">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<div id="test">
|
||||
<script>
|
||||
var t404 = async_test("Should get an error event for a 404 error.")
|
||||
t404.step(function() {
|
||||
var elt = document.createElement("link");
|
||||
elt.onerror = t404.step_func(function() {
|
||||
assert_true(true, "Got error event for 404 error.")
|
||||
t404.step_timeout(function() { t404.done() }, 0);
|
||||
})
|
||||
elt.onload = t404.unreached_func("load event should not be fired");
|
||||
elt.rel = "stylesheet";
|
||||
elt.href = "nonexistent_stylesheet.css";
|
||||
document.getElementsByTagName("head")[0].appendChild(elt);
|
||||
})
|
||||
|
||||
var tUnsupported = async_test("Should get an error event for an unsupported URL.")
|
||||
tUnsupported.step(function() {
|
||||
var elt = document.createElement("link");
|
||||
elt.onerror = tUnsupported.step_func(function() {
|
||||
assert_true(true, "Got error event for unsupported URL.")
|
||||
tUnsupported.step_timeout(function() { tUnsupported.done() }, 0);
|
||||
})
|
||||
elt.onload = tUnsupported.unreached_func("load event should not be fired");
|
||||
elt.rel = "stylesheet";
|
||||
elt.href = "nonexistent:stylesheet.css";
|
||||
document.getElementsByTagName("head")[0].appendChild(elt);
|
||||
})
|
||||
|
||||
var tText = async_test("Should get an error event for a text/plain response.")
|
||||
tText.step(function() {
|
||||
var elt = document.createElement("link");
|
||||
elt.onerror = tText.step_func(function() {
|
||||
assert_true(true, "Got error event for 404 error.")
|
||||
tText.done()
|
||||
})
|
||||
elt.onload = tText.unreached_func("load event should not be fired");
|
||||
elt.rel = "stylesheet";
|
||||
elt.href = "../../../../../common/css-red.txt";
|
||||
document.getElementsByTagName("head")[0].appendChild(elt);
|
||||
})
|
||||
</script>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
background-color: green;
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
background-color: white;
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Stylesheet Without Base Tag</title>
|
||||
<style>
|
||||
body { background-color: green; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Stylesheet With Base Tag</title>
|
||||
<link rel="match" href="stylesheet-with-base-ref.html">
|
||||
<base href="resources/">
|
||||
<link rel="stylesheet" href="stylesheet.css">
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
background-color: red;
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
def main(request, response):
|
||||
try:
|
||||
count = int(request.server.stash.take(request.GET["id"]))
|
||||
except:
|
||||
count = 0
|
||||
if "count" in request.GET:
|
||||
return str(count)
|
||||
request.server.stash.put(request.GET["id"], str(count + 1))
|
||||
return 'body { color: red }'
|
||||
Loading…
Add table
Add a link
Reference in a new issue