Bug 1417824 part 2 - Add reftest for this bug. r?heycam
MozReview-Commit-ID: GxQG5kqo0sM
new file mode 100644
--- /dev/null
+++ b/layout/xul/reftest/checkbox-dynamic-change-ref.xul
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <checkbox id="c1"/>
+ <checkbox id="c2" checked="true"/>
+</window>
new file mode 100644
--- /dev/null
+++ b/layout/xul/reftest/checkbox-dynamic-change.xul
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="reftest-wait">
+ <checkbox id="c1" checked="true"/>
+ <checkbox id="c2"/>
+ <script>
+ window.requestAnimationFrame(() => {
+ window.requestAnimationFrame(() => {
+ let c1 = document.getElementById("c1");
+ let c2 = document.getElementById("c2");
+ c1.removeAttribute("checked");
+ c2.setAttribute("checked", true);
+ document.documentElement.className = "";
+ });
+ });
+ </script>
+</window>
new file mode 100644
--- /dev/null
+++ b/layout/xul/reftest/radio-dynamic-change-ref.xul
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <radio id="r1"/>
+ <radio id="r2" selected="true"/>
+</window>
new file mode 100644
--- /dev/null
+++ b/layout/xul/reftest/radio-dynamic-change.xul
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="reftest-wait">
+ <radio id="r1" selected="true"/>
+ <radio id="r2"/>
+ <script>
+ window.requestAnimationFrame(() => {
+ window.requestAnimationFrame(() => {
+ let r1 = document.getElementById("r1");
+ let r2 = document.getElementById("r2");
+ r1.removeAttribute("selected");
+ r2.setAttribute("selected", true);
+ document.documentElement.className = "";
+ });
+ });
+ </script>
+</window>
--- a/layout/xul/reftest/reftest.list
+++ b/layout/xul/reftest/reftest.list
@@ -1,6 +1,9 @@
fails-if(Android) == textbox-multiline-noresize.xul textbox-multiline-ref.xul # reference is blank on Android (due to no native theme support?)
!= textbox-multiline-resize.xul textbox-multiline-ref.xul
== popup-explicit-size.xul popup-explicit-size-ref.xul
random-if(Android) fuzzy-if(webrender,128-128,168-168) == image-size.xul image-size-ref.xul
== image-scaling-min-height-1.xul image-scaling-min-height-1-ref.xul
== textbox-text-transform.xul textbox-text-transform-ref.xul
+
+== checkbox-dynamic-change.xul checkbox-dynamic-change-ref.xul
+== radio-dynamic-change.xul radio-dynamic-change-ref.xul