Bug 1372056: Test for dynamic text-decoration propagation. r?xidorn
MozReview-Commit-ID: ArB3uZmzhwn
--- a/layout/reftests/w3c-css/submitted/text-decor-3/reftest.list
+++ b/layout/reftests/w3c-css/submitted/text-decor-3/reftest.list
@@ -1,10 +1,11 @@
fails-if(stylo) == ruby-text-decoration-01.html ruby-text-decoration-01-ref.html
== text-decoration-propagation-01.html text-decoration-propagation-01-ref.html
+== text-decoration-propagation-dynamic-001.html text-decoration-propagation-dynamic-001-ref.html
# text-emphasis-style
== text-emphasis-style-property-001.html text-emphasis-style-property-001-ref.html
fuzzy-if(gtkWidget,3,4) fuzzy-if(skiaContent,104,80) == text-emphasis-style-property-002.html text-emphasis-style-property-002-ref.html
== text-emphasis-style-property-003.html text-emphasis-style-property-003-ref.html
== text-emphasis-style-property-004.html text-emphasis-style-property-004-ref.html
== text-emphasis-style-property-005.html text-emphasis-style-property-005-ref.html
== text-emphasis-style-property-005a.html text-emphasis-style-property-005-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-decoration-propagation-dynamic-001-ref.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>CSS Test reference: Dynamic text-decoration propagation</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<link rel="help" href="https://www.w3.org/TR/css-text-decor-3/#line-decoration">
+<style>
+ div { text-decoration: underline }
+</style>
+<div>
+ <span><b>Should be underlined</b></span>
+</div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-decoration-propagation-dynamic-001.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<title>CSS Test: Dynamic text-decoration propagation</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<link rel="help" href="https://www.w3.org/TR/css-text-decor-3/#line-decoration">
+<link rel="match" href="text-decoration-propagation-dymanic-001-ref.html">
+<style>
+ div { text-decoration: none }
+ div.restyled { text-decoration: underline }
+</style>
+<div>
+ <span><b>Should be underlined</b></span>
+</div>
+<script>
+ document.body.offsetTop;
+ document.querySelector('div').classList = "restyled";
+</script>