Bug 844275 - Update test_acceleration to guard against windows with no layer manager. r=joedrew

This commit is contained in:
Kartikaya Gupta 2013-02-28 13:28:24 -05:00
parent 1fa05720fa
commit 8c5695896a

View File

@ -33,8 +33,13 @@ var acceleratedWindows = 0;
while (windows.hasMoreElements()) {
windowutils = windows.getNext().QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
if (windowutils.layerManagerType != "Basic") {
acceleratedWindows++;
try {
if (windowutils.layerManagerType != "Basic") {
acceleratedWindows++;
}
} catch (e) {
// The window may not have a layer manager, in which case we get an error.
// Don't count it as an accelerated window.
}
}