diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/reftests/xul/mac-tab-toolbar.xhtml | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/xul/mac-tab-toolbar.xhtml')
-rw-r--r-- | layout/reftests/xul/mac-tab-toolbar.xhtml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/layout/reftests/xul/mac-tab-toolbar.xhtml b/layout/reftests/xul/mac-tab-toolbar.xhtml new file mode 100644 index 0000000000..4582dbc7de --- /dev/null +++ b/layout/reftests/xul/mac-tab-toolbar.xhtml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="reftest-wait"> + <tabbox id="tab"> + <tabs> + <tab label="zeroTab" id="0" /> + <tab label="firstTab" id="1" /> + <tab label="secondtab" id="2" /> + <tab label="thirdTab" id="3" /> + <tab label="fourthTab" id="4" /> + <tab label="fifthTab" id="5" /> + <tab label="sixthTab" id="6" /> + <tab label="seventhTab" id="7" /> + <tab label="eightTab" id="8" /> + <tab label="ninthTab" id="9" /> + </tabs> + </tabbox> + + <script type="text/javascript"> + // Overly try to iterate and click through the tabs + // since its a timing specific bug. + var tabCount = 10; + var loops = 10; + var i = tabCount * loops; + + function clickTabs() { + var currentTab = i % tabCount; + var tab = document.getElementById(currentTab); + tab.click(); + + if (i > 0) { + i--; + // Relinquish main thread so we can paint + setTimeout(clickTabs, 0); + } else { + // Test finished + document.documentElement.removeAttribute("class"); + } + } + + window.addEventListener('MozReftestInvalidate', clickTabs); + </script> +</window> |