Bug 1339629 Part 14: Add reftests to verify we clone css group rules when we clone the stylesheet. r=heycam

MozReview-Commit-ID: CcMiDhXtaVT

--HG--
rename : layout/reftests/stylesheet-cloning/style_rule_clone.html => layout/reftests/stylesheet-cloning/style-rule-clone.html
extra : rebase_source : fd1f5b62d191d8876f34f89d747d3eade1fd7172
This commit is contained in:
Brad Werth 2017-05-24 16:45:34 -07:00
Родитель 159967604d
Коммит 8b7a13bba0
5 изменённых файлов: 34 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,10 @@
<!DOCTYPE html>
<link rel="stylesheet" href="data:text/css,@-moz-document regexp('.*') {div { color: green; }}">
<link rel="stylesheet" href="data:text/css,@-moz-document regexp('.*') {div { color: green; }}">
<div>This should be green</div>
<script>
onload = function() {
var links = document.getElementsByTagName("link");
links[0].sheet.cssRules[0].cssRules[0].style.color = "red";
}
</script>

Просмотреть файл

@ -0,0 +1,10 @@
<!DOCTYPE html>
<link rel="stylesheet" href="data:text/css,@media all {div { color: green; }}">
<link rel="stylesheet" href="data:text/css,@media all {div { color: green; }}">
<div>This should be green</div>
<script>
onload = function() {
var links = document.getElementsByTagName("link");
links[0].sheet.cssRules[0].cssRules[0].style.color = "red";
}
</script>

Просмотреть файл

@ -1 +1,4 @@
== style_rule_clone.html shouldbegreen-ref.html
== document-rule-clone.html shouldbegreen-ref.html
== media-rule-clone.html shouldbegreen-ref.html
== style-rule-clone.html shouldbegreen-ref.html
skip-if(stylo) == supports-rule-clone.html shouldbegreen-ref.html # bug 1367610

Просмотреть файл

@ -0,0 +1,10 @@
<!DOCTYPE html>
<link rel="stylesheet" href="data:text/css,@supports (color: green) {div { color: green; }}">
<link rel="stylesheet" href="data:text/css,@supports (color: green) {div { color: green; }}">
<div>This should be green</div>
<script>
onload = function() {
var links = document.getElementsByTagName("link");
links[0].sheet.cssRules[0].cssRules[0].style.color = "red";
}
</script>