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
Родитель 1fa05720fa
Коммит 8c5695896a
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -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.
}
}