Bug 1358375 - Reftest for refreshing the cached booleans. r=bz
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1358375-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+#x { }
+ </style>
+ </head>
+ <body onload="getComputedStyle(document.getElementById('x')).color;
+ document.styleSheets[0].cssRules[0].style.color = 'orange';
+ document.documentElement.removeAttribute('class');">
+ <div id="x"><span>I should be orange</span></div>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1358375-2.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+#x { color: orange; }
+#x { color: green; }
+ </style>
+ </head>
+ <body onload="getComputedStyle(document.getElementById('x')).color;
+ document.styleSheets[0].cssRules[0].style.setProperty('color', 'orange', 'important');
+ document.documentElement.removeAttribute('class');">
+ <div id="x"><span>I should be orange</span></div>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1358375-3.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+#x { }
+#x { color: green; }
+ </style>
+ </head>
+ <body onload="getComputedStyle(document.getElementById('x')).color;
+ document.styleSheets[0].cssRules[0].style.setProperty('color', 'orange', 'important');
+ document.documentElement.removeAttribute('class');">
+ <div id="x"><span>I should be orange</span></div>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1358375-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+#x { color: orange; }
+ </style>
+ </head>
+ <body>
+ <div id="x"><span>I should be orange</span></div>
+ </body>
+</html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1986,8 +1986,11 @@ fuzzy(2,20000) == 1315113-2.html 1315113
== 1315632-1.html 1315632-1-ref.html
fuzzy(2,40000) == 1316719-1a.html 1316719-1-ref.html
fuzzy(2,40000) == 1316719-1b.html 1316719-1-ref.html
fuzzy(2,40000) == 1316719-1c.html 1316719-1-ref.html
skip-if(Android) != 1318769-1.html 1318769-1-ref.html
== 1322512-1.html 1322512-1-ref.html
== 1330051.svg 1330051-ref.svg
== 1352464-1.html 1352464-1-ref.html
+== 1358375-1.html 1358375-ref.html
+== 1358375-2.html 1358375-ref.html
+== 1358375-3.html 1358375-ref.html