Bug 1339629 Part 15: Add reftests to test other css rules clone properly when stylesheet is cloned. draft
authorBrad Werth <bwerth@mozilla.com>
Tue, 23 May 2017 21:47:24 -0700
changeset 584209 52507347408a4e5dc2b52c8fc0da770f682fc66d
parent 584208 f02a093e37bb703f4d0ca5b59e1b5417c59e5807
child 584210 ec07a12227d2a5a14576e7629031d6d592d5f334
push id60647
push userbwerth@mozilla.com
push dateThu, 25 May 2017 00:33:14 +0000
bugs1339629
milestone55.0a1
Bug 1339629 Part 15: Add reftests to test other css rules clone properly when stylesheet is cloned. MozReview-Commit-ID: GYBwRpDoPMD
layout/reftests/stylesheet-cloning/counter-style-rule-clone.html
layout/reftests/stylesheet-cloning/glyphs-ref.html
layout/reftests/stylesheet-cloning/ref-common.css
layout/reftests/stylesheet-cloning/reftest.list
layout/reftests/stylesheet-cloning/test-common.css
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/counter-style-rule-clone.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="data:text/css,@counter-style a { system: fixed; symbols: A B C D; suffix: '' }">
+<link rel="stylesheet" href="data:text/css,@counter-style a { system: fixed; symbols: A B C D; suffix: '' }">
+<link rel="stylesheet" href="test-common.css">
+<ol style="list-style-type: a">
+  <li><li><li><li><li>
+</ol>
+<script>
+  onload = function() {
+    var links = document.getElementsByTagName("link");
+    links[0].sheet.cssRules[0].symbols = "\25F0 \25F1 \25F2 \25F3";
+  }
+</script>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/glyphs-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- list-style-type: a -->
+<div>A</div>
+<div>B</div>
+<div>C</div>
+<div>D</div>
+<div>5</div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/ref-common.css
@@ -0,0 +1,12 @@
+body {
+  /* to match ua.css, see bug 1020143 */
+  font-variant-numeric: tabular-nums;
+}
+div, p {
+  padding: 0; margin: 0;
+  line-height: 150%;
+  float: left;
+}
+p {
+  padding-right: .5em;
+}
--- a/layout/reftests/stylesheet-cloning/reftest.list
+++ b/layout/reftests/stylesheet-cloning/reftest.list
@@ -1,4 +1,6 @@
+fuzzy-if(webrender,212,342) == counter-style-rule-clone.html glyphs-ref.html # passes trivially
+# because "Dynamic change on @counter-style not yet supported"
 == 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
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/test-common.css
@@ -0,0 +1,18 @@
+body {
+  /* to match ua.css, see bug 1020143 */
+  font-variant-numeric: tabular-nums;
+}
+ol, ul, section, p {
+  padding: 0; margin: 0;
+  line-height: 150%;
+}
+ol, ul {
+  list-style-position: inside;
+}
+li, p {
+  float: left;
+  padding: 0;
+}
+p {
+  padding-right: .5em;
+}