mac-tab-toolbar.xhtml (1309B)
1 <?xml version="1.0" encoding="UTF-8"?> 2 <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> 3 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="reftest-wait"> 4 <tabbox id="tab"> 5 <tabs> 6 <tab label="zeroTab" id="0" /> 7 <tab label="firstTab" id="1" /> 8 <tab label="secondtab" id="2" /> 9 <tab label="thirdTab" id="3" /> 10 <tab label="fourthTab" id="4" /> 11 <tab label="fifthTab" id="5" /> 12 <tab label="sixthTab" id="6" /> 13 <tab label="seventhTab" id="7" /> 14 <tab label="eightTab" id="8" /> 15 <tab label="ninthTab" id="9" /> 16 </tabs> 17 </tabbox> 18 19 <script type="text/javascript"> 20 // Overly try to iterate and click through the tabs 21 // since its a timing specific bug. 22 var tabCount = 10; 23 var loops = 10; 24 var i = tabCount * loops; 25 26 function clickTabs() { 27 var currentTab = i % tabCount; 28 var tab = document.getElementById(currentTab); 29 tab.click(); 30 31 if (i > 0) { 32 i--; 33 // Relinquish main thread so we can paint 34 setTimeout(clickTabs, 0); 35 } else { 36 // Test finished 37 document.documentElement.removeAttribute("class"); 38 } 39 } 40 41 window.addEventListener('MozReftestInvalidate', clickTabs); 42 </script> 43 </window>