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,14 @@
<!doctype html>
<title>Historical style element features should not be supported</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
function t(property) {
test(function() {
assert_false(property in document.createElement('style'));
}, 'style.' + property + ' should not be supported');
}
// added in https://github.com/whatwg/html/commit/29cf39d2163cfc85b67409f4e10390619ffb2b40
// removed in https://github.com/whatwg/html/commit/c2a3b2a2e3db49c14b486a5e99acf7d10cfe8443
t('scoped');
</script>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>[style] Reference file</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<style>
h4 {
color: green;
}
</style>
<body>
<p>
This page tests that Style written inside HTML comment is not applied
</p>
This test passes if the text below is <b>Green. NOT Red.</b>
<h4>
This is some text.
</h4>
</body>

View file

@ -0,0 +1,18 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="match" href="html_style_in_comment-ref.html"/>
<style type="text/css">
h4 {color: green}
<!--
h4 {color: red}
-->
</style>
</head>
<body>
<p> This page tests that Style written inside HTML comment is not applied</p>
This test passes if the text below is <b>Green. NOT Red.</b>
<h4>
This is some text.
</h4>
</body>
</html>

View file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<title>style: error events</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-style-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("style");
// elt.onerror = t404.step_func(function() {
// assert_true(true, "Got error event for 404 error.")
// t404.done()
// })
// elt.appendChild(
// document.createTextNode('@import 404 error;'));
// 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("style");
elt.onerror = tText.step_func(function() {
assert_true(true, "Got error event for 404 error.")
tText.done()
})
elt.appendChild(
document.createTextNode('@import "../../../../common/css-red.txt";'));
document.getElementsByTagName("head")[0].appendChild(elt);
})
</script>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML Test: The style should not be applied if it is disabled</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-style-element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#test {
width: 100px;
}
</style>
<style id="style">
#test {
width: 50px;
}
</style>
</head>
<body>
<div id="log"></div>
<div id="test"></div>
<script>
test(function() {
var testElement = document.getElementById("test");
var style = document.getElementById("style");
var width1, width2;
width1 = window.getComputedStyle(testElement, false)["width"];
assert_equals(width1, "50px", "The style should be applied.");
style.disabled = true;
width2 = window.getComputedStyle(testElement, false)["width"];
assert_equals(width2, "100px", "The style should not be applied.");
}, "The style is not applied when it is disabled");
</script>
</body>
</html>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML Test: The style events</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-style-element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var tLoad = async_test("If the style is loaded successfully, the 'load' event must be fired");
var tError = async_test("If the style is loaded unsuccessfully, the 'error' event must be fired");
function onstyleload(e) {
tLoad.done();
}
function onstyleerror(e) {
tError.done();
}
</script>
<style onload="onstyleload()">
#test {
height: 100px;
width: 100px;
}
</style>
<style onerror="onstyleerror()">
@import url(nonexistent.css);
</style>
</head>
<body>
<div id="log"></div>
<div id="test"></div>
</body>
</html>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML Test: The style information must be applied to the environment specified by the media attribute</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#attr-style-media">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-style-element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#test {
width: 100px;
}
</style>
<style id="style">
#test {
width: 50px;
}
</style>
</head>
<body>
<div id="log"></div>
<div id="test"></div>
<script>
test(function() {
var testElement = document.getElementById("test");
var style = document.getElementById("style");
var width1, width2;
width1 = window.getComputedStyle(testElement, false)["width"];
assert_equals(width1, "50px", "The style should be applied.");
style.media = "print";
width2 = window.getComputedStyle(testElement, false)["width"];
assert_equals(width2, "100px", "The style should not be applied.");
}, "The style information must be applied to the environment specified by the media attribute");
</script>
</body>
</html>