mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1098064 part C - remove SimpleTest and reftest testPluginIsOOP and related usage, r=jimm
This commit is contained in:
parent
49c79bd187
commit
1851cc4c35
@ -8,7 +8,7 @@ load 570884.html
|
||||
# the X server, which is a bad assumption for <browser remote>.
|
||||
# Plugin arch is going to change anyway with OOP content so skipping
|
||||
# this test for now is OK.
|
||||
skip-if(browserIsRemote||!haveTestPlugin||http.platform!="X11"||!testPluginIsOOP()) load 598862.html
|
||||
skip-if(browserIsRemote||!haveTestPlugin||http.platform!="X11") load 598862.html
|
||||
|
||||
# SkiaGL is causing a compositor hang here, disable temporarily while that gets resolved in bug 908363
|
||||
skip-if(Android) load 626602-1.html
|
||||
|
@ -11,12 +11,6 @@
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
window.frameLoaded = function frameLoaded_toCrash() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
ok(true, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
SimpleTest.expectChildProcessCrash();
|
||||
|
||||
crashAndGetCrashServiceRecord("crash", function (cm, crash) {
|
||||
|
@ -11,12 +11,6 @@
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
window.frameLoaded = function frameLoaded_toCrash() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
ok(true, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
SimpleTest.expectChildProcessCrash();
|
||||
|
||||
// the default timeout is annoying high for mochitest runs
|
||||
|
@ -15,18 +15,11 @@
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
function start() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
ok(true, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
if (navigator.platform.startsWith("Win")) {
|
||||
SimpleTest.expectAssertions(0, 350);
|
||||
}
|
||||
else {
|
||||
if (navigator.platform.startsWith("Win")) {
|
||||
SimpleTest.expectAssertions(0, 350);
|
||||
}
|
||||
|
||||
setTimeout(checkGCRace, 1000);
|
||||
}
|
||||
setTimeout(checkGCRace, 1000);
|
||||
}
|
||||
|
||||
var nested = false;
|
||||
|
@ -22,12 +22,6 @@
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTests() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
ok(true, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// Default plugin hang timeout is too high for mochitests
|
||||
var prefs = Cc["@mozilla.org/preferences-service;1"]
|
||||
.getService(Ci.nsIPrefBranch);
|
||||
|
@ -9,12 +9,6 @@
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
window.frameLoaded = function frameLoaded_toCrash() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
ok(true, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
var iframe = document.getElementById('iframe1');
|
||||
var p = iframe.contentDocument.getElementById('plugin1');
|
||||
|
||||
|
@ -88,16 +88,10 @@ function onPluginCrashed(aEvent) {
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
ok(true, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
var os = Components.classes["@mozilla.org/observer-service;1"].
|
||||
getService(Components.interfaces.nsIObserverService);
|
||||
os.addObserver(testObserver, "plugin-crashed", true);
|
||||
|
||||
|
||||
document.addEventListener("PluginCrashed", onPluginCrashed, false);
|
||||
|
||||
var pluginElement = document.getElementById("plugin1");
|
||||
|
@ -91,11 +91,6 @@ function onPluginCrashed(aEvent) {
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
ok(true, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
// the test harness will have set MOZ_CRASHREPORTER_NO_REPORT,
|
||||
// ensure that we can change the setting and have our minidumps
|
||||
// wind up in Crash Reports/pending
|
||||
@ -106,7 +101,7 @@ function runTests() {
|
||||
var os = Components.classes["@mozilla.org/observer-service;1"].
|
||||
getService(Components.interfaces.nsIObserverService);
|
||||
os.addObserver(testObserver, "plugin-crashed", true);
|
||||
|
||||
|
||||
document.addEventListener("PluginCrashed", onPluginCrashed, false);
|
||||
|
||||
var pluginElement = document.getElementById("plugin1");
|
||||
|
@ -123,12 +123,6 @@ function onPluginCrashed(aEvent) {
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
todo(false, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// the test harness will have set MOZ_CRASHREPORTER_NO_REPORT,
|
||||
// ensure that we can change the setting and have our minidumps
|
||||
// wind up in Crash Reports/pending
|
||||
@ -142,7 +136,7 @@ function runTests() {
|
||||
var os = Components.classes["@mozilla.org/observer-service;1"].
|
||||
getService(Components.interfaces.nsIObserverService);
|
||||
os.addObserver(testObserver, "crash-report-status", true);
|
||||
|
||||
|
||||
document.addEventListener("PluginCrashed", onPluginCrashed, false);
|
||||
|
||||
var pluginElement = document.getElementById("plugin1");
|
||||
|
@ -9,12 +9,6 @@
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
window.frameLoaded = function frameLoaded_toCrash() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
ok(true, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
SimpleTest.expectChildProcessCrash();
|
||||
|
||||
var iframe = document.getElementById('iframe1');
|
||||
|
@ -13,12 +13,6 @@
|
||||
var iframe = document.getElementById('iframe1');
|
||||
|
||||
function mainLoaded() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
ok(true, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
SimpleTest.expectChildProcessCrash();
|
||||
|
||||
var p = iframe.contentDocument.createElement('embed');
|
||||
|
@ -130,12 +130,6 @@ function onPluginCrashed(aEvent) {
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
todo(false, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// Default plugin hang timeout is too high for mochitests
|
||||
Services.prefs.setIntPref("dom.ipc.plugins.timeoutSecs", 1);
|
||||
|
||||
|
@ -9,12 +9,6 @@
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
window.frameLoaded = function frameLoaded_toCrash() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
ok(true, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
SimpleTest.expectChildProcessCrash();
|
||||
|
||||
// the default timeout is annoying high for mochitest runs
|
||||
|
@ -96,11 +96,6 @@ function finishTest() {
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
ok(true, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
resetVars();
|
||||
|
||||
hanguiOperation("Prime ChromeWorker", 0, false, false, HANGUIOP_NOTHING, 0,
|
||||
|
@ -22,12 +22,6 @@
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTests() {
|
||||
if (!SimpleTest.testPluginIsOOP()) {
|
||||
ok(true, "Skipping this test when test plugin is not OOP.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// Default plugin hang timeout is too high for mochitests
|
||||
var prefs = Cc["@mozilla.org/preferences-service;1"]
|
||||
.getService(Ci.nsIPrefBranch);
|
||||
|
@ -21,11 +21,9 @@
|
||||
var didPaint = function() {};
|
||||
|
||||
function startTest() {
|
||||
if (SimpleTest.testPluginIsOOP()) {
|
||||
if (p.getPaintCount() < 1) {
|
||||
setTimeout(startTest, 0);
|
||||
return;
|
||||
}
|
||||
if (p.getPaintCount() < 1) {
|
||||
setTimeout(startTest, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
didPaint = function() {
|
||||
|
@ -1,16 +1,7 @@
|
||||
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 {
|
||||
try {
|
||||
if (SpecialPowers.Cc["@mozilla.org/gfx/info;1"].getService(SpecialPowers.Ci.nsIGfxInfo).D2DEnabled) {
|
||||
realExpected *= 2;
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
++realExpected; // extra paint at startup for all async-rendering plugins
|
||||
ok(realExpected == count, msg + " (expected " + expected +
|
||||
" independent paints, expected " + realExpected + " logged paints, got " +
|
||||
count + " actual paints)");
|
||||
|
@ -8,8 +8,8 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) =
|
||||
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == border-padding-2.html border-padding-2-ref.html # bug 629430
|
||||
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin) skip-if(Android||B2G) == border-padding-3.html border-padding-3-ref.html # bug 629430 # bug 773482
|
||||
# The following two "pluginproblemui-direction" tests are unreliable on all platforms. They should be re-written or replaced.
|
||||
#random-if(cocoaWidget||d2d||/^Windows\x20NT\x205\.1/.test(http.oscpu)) fails-if(!haveTestPlugin&&!Android) skip-if(!testPluginIsOOP()) == pluginproblemui-direction-1.html pluginproblemui-direction-1-ref.html # bug 567367
|
||||
#random-if(cocoaWidget) fails-if(!haveTestPlugin&&!Android) skip-if(!testPluginIsOOP()) == pluginproblemui-direction-2.html pluginproblemui-direction-2-ref.html
|
||||
#random-if(cocoaWidget||d2d||/^Windows\x20NT\x205\.1/.test(http.oscpu)) fails-if(!haveTestPlugin&&!Android) == pluginproblemui-direction-1.html pluginproblemui-direction-1-ref.html # bug 567367
|
||||
#random-if(cocoaWidget) fails-if(!haveTestPlugin&&!Android) == pluginproblemui-direction-2.html pluginproblemui-direction-2-ref.html
|
||||
fails-if(!haveTestPlugin) == plugin-canvas-alpha-zindex.html div-alpha-zindex.html
|
||||
fails-if(!haveTestPlugin) == plugin-transform-alpha-zindex.html div-alpha-zindex.html
|
||||
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == plugin-busy-alpha-zindex.html div-alpha-zindex.html
|
||||
|
@ -711,37 +711,6 @@ function BuildConditionSandbox(aURL) {
|
||||
getIntPref: function(p) { return prefs.getIntPref(p); }
|
||||
}, sandbox, { cloneFunctions: true });
|
||||
|
||||
sandbox.testPluginIsOOP = function () {
|
||||
var prefservice = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(CI.nsIPrefBranch);
|
||||
|
||||
var testPluginIsOOP = false;
|
||||
if (navigator.platform.indexOf("Mac") == 0) {
|
||||
var xulRuntime = Components.classes["@mozilla.org/xre/app-info;1"]
|
||||
.getService(CI.nsIXULAppInfo)
|
||||
.QueryInterface(CI.nsIXULRuntime);
|
||||
if (xulRuntime.XPCOMABI.match(/x86-/)) {
|
||||
try {
|
||||
testPluginIsOOP = prefservice.getBoolPref("dom.ipc.plugins.enabled.i386.test.plugin");
|
||||
} catch (e) {
|
||||
testPluginIsOOP = prefservice.getBoolPref("dom.ipc.plugins.enabled.i386");
|
||||
}
|
||||
}
|
||||
else if (xulRuntime.XPCOMABI.match(/x86_64-/)) {
|
||||
try {
|
||||
testPluginIsOOP = prefservice.getBoolPref("dom.ipc.plugins.enabled.x86_64.test.plugin");
|
||||
} catch (e) {
|
||||
testPluginIsOOP = prefservice.getBoolPref("dom.ipc.plugins.enabled.x86_64");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
testPluginIsOOP = prefservice.getBoolPref("dom.ipc.plugins.enabled");
|
||||
}
|
||||
|
||||
return testPluginIsOOP;
|
||||
};
|
||||
|
||||
// Tests shouldn't care about this except for when they need to
|
||||
// crash the content process
|
||||
sandbox.browserIsRemote = gBrowserIsRemote;
|
||||
|
@ -35,7 +35,6 @@ function starttest() {
|
||||
todo_isnot(true, true, "test todo_isnot");
|
||||
|
||||
//misc
|
||||
is(typeof(SimpleTest.testPluginIsOOP()), "boolean", 'testPluginIsOOP should be bool');
|
||||
SimpleTest.requestLongerTimeout(1);
|
||||
|
||||
//note: this test may alter runtimes as it waits
|
||||
|
@ -214,13 +214,6 @@ if (typeof(computedStyle) == 'undefined') {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for OOP test plugin
|
||||
**/
|
||||
SimpleTest.testPluginIsOOP = function () {
|
||||
return true;
|
||||
};
|
||||
|
||||
SimpleTest._tests = [];
|
||||
SimpleTest._stopOnLoad = true;
|
||||
SimpleTest._cleanupFunctions = [];
|
||||
|
Loading…
Reference in New Issue
Block a user