Bug 1340627. OS X XUL UI test to check for CG Borrow/Return CGContext r=lsalzman

This commit is contained in:
Mason Chang 2017-05-17 08:20:39 -07:00
parent 3ada647c06
commit 31c2614b44
4 changed files with 61 additions and 1 deletions

View File

@ -157,7 +157,7 @@ browser.jar:
* content/browser/hiddenWindow.xul (content/hiddenWindow.xul)
#ifdef XP_MACOSX
* content/browser/macBrowserOverlay.xul (content/macBrowserOverlay.xul)
* content/browser/softwareUpdateOverlay.xul (content/softwareUpdateOverlay.xul)
* content/browser/softwareUpdateOverlay.xul (content/softwareUpdateOverlay.xul)
#endif
* content/browser/viewSourceOverlay.xul (content/viewSourceOverlay.xul)
#ifndef XP_MACOSX

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<tabbox id="tab">
<tabs>
<tab label="zeroTab" id="0" selected="true" />
<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>
</window>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>

View File

@ -8,6 +8,7 @@ random-if(Android) fails-if(winWidget) == menulist-shrinkwrap-2.xul menulist-shr
# accesskeys are not normally displayed on Mac, so skip this test
skip-if(cocoaWidget) == accesskey.xul accesskey-ref.xul
fails-if(cocoaWidget) fuzzy-if(xulRuntime.widgetToolkit=="gtk3",1,11) == tree-row-outline-1.xul tree-row-outline-1-ref.xul # win8: bug 1254832
skip-if(!cocoaWidget) == mac-tab-toolbar.xul mac-tab-toolbar-ref.xul
!= tree-row-outline-1.xul tree-row-outline-1-notref.xul
== text-crop.xul text-crop-ref.xul
== text-small-caps-1.xul text-small-caps-1-ref.xul