mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
952c2f25af
--HG-- extra : rebase_source : 6d397273f10e659a08125b3861e1651a3994aaa0
19 lines
723 B
JavaScript
19 lines
723 B
JavaScript
function paintCountIs(plugin, expected, msg) {
|
|
var count = plugin.getPaintCount();
|
|
var realExpected = expected;
|
|
var isAsync = SimpleTest.testPluginIsOOP();
|
|
if (isAsync) {
|
|
++realExpected; // extra paint at startup for all async-rendering plugins
|
|
} else {
|
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
try {
|
|
if (Components.classes["@mozilla.org/gfx/info;1"].getService(Components.interfaces.nsIGfxInfo).D2DEnabled) {
|
|
realExpected *= 2;
|
|
}
|
|
} catch (e) {}
|
|
}
|
|
ok(realExpected == count, msg + " (expected " + expected +
|
|
" independent paints, expected " + realExpected + " logged paints, got " +
|
|
count + " actual paints)");
|
|
}
|