зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 55b6a42400b0 (bug 1218364) for browser_windowless_troubleshoot_crash.js test failures
This commit is contained in:
Родитель
8097d52b90
Коммит
8cf071a922
|
@ -760,7 +760,6 @@ void
|
|||
ClientLayerManager::GetBackendName(nsAString& aName)
|
||||
{
|
||||
switch (mForwarder->GetCompositorBackendType()) {
|
||||
case LayersBackend::LAYERS_NONE: aName.AssignLiteral("None"); return;
|
||||
case LayersBackend::LAYERS_BASIC: aName.AssignLiteral("Basic"); return;
|
||||
case LayersBackend::LAYERS_OPENGL: aName.AssignLiteral("OpenGL"); return;
|
||||
case LayersBackend::LAYERS_D3D9: aName.AssignLiteral("Direct3D 9"); return;
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
[browser_windowless_troubleshoot_crash.js]
|
|
@ -1,45 +0,0 @@
|
|||
let { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
|
||||
|
||||
add_task(function* test_windowlessBrowserTroubleshootCrash() {
|
||||
let webNav = Services.appShell.createWindowlessBrowser(false);
|
||||
|
||||
let onLoaded = new Promise((resolve, reject) => {
|
||||
let docShell = webNav.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDocShell);
|
||||
let listener = {
|
||||
observe(contentWindow, topic, data) {
|
||||
let observedDocShell = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShellTreeItem)
|
||||
.sameTypeRootTreeItem
|
||||
.QueryInterface(Ci.nsIDocShell);
|
||||
if (docShell === observedDocShell) {
|
||||
Services.obs.removeObserver(listener, "content-document-global-created", false);
|
||||
resolve();
|
||||
}
|
||||
}
|
||||
}
|
||||
Services.obs.addObserver(listener, "content-document-global-created", false);
|
||||
});
|
||||
webNav.loadURI("about:blank", 0, null, null, null);
|
||||
|
||||
yield onLoaded;
|
||||
|
||||
let winUtils = webNav.document.defaultView.
|
||||
QueryInterface(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIDOMWindowUtils);
|
||||
is(winUtils.layerManagerType, "None", "windowless browser's layerManagerType should be 'None'");
|
||||
|
||||
ok(true, "not crashed");
|
||||
|
||||
var Troubleshoot = Cu.import("resource://gre/modules/Troubleshoot.jsm", {}).Troubleshoot;
|
||||
var data = yield new Promise((resolve, reject) => {
|
||||
Troubleshoot.snapshot((data) => {
|
||||
resolve(data);
|
||||
});
|
||||
});
|
||||
|
||||
is(data.graphics.numTotalWindows, 2, "windowless browser window should not be counted as windows in the troubleshoot graphics report");
|
||||
is(data.graphics.numAcceleratedWindows, 0, "windowless browser window should not be counted as an accelerated window");
|
||||
is(data.graphics.windowLayerManagerType, "Basic", "windowless browser window should not set windowLayerManagerType to 'None'");
|
||||
});
|
|
@ -6,4 +6,3 @@
|
|||
|
||||
XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
|
||||
MOCHITEST_MANIFESTS += ['mochitest/mochitest.ini']
|
||||
BROWSER_CHROME_MANIFESTS += ['browser/browser.ini']
|
||||
|
|
|
@ -307,15 +307,11 @@ var dataProviders = {
|
|||
data.numAcceleratedWindows = 0;
|
||||
let winEnumer = Services.ww.getWindowEnumerator();
|
||||
while (winEnumer.hasMoreElements()) {
|
||||
data.numTotalWindows++;
|
||||
let winUtils = winEnumer.getNext().
|
||||
QueryInterface(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIDOMWindowUtils);
|
||||
try {
|
||||
// NOTE: windowless browser's windows should not be reported in the graphics troubleshoot report
|
||||
if (winUtils.layerManagerType == "None") {
|
||||
continue;
|
||||
}
|
||||
data.numTotalWindows++;
|
||||
data.windowLayerManagerType = winUtils.layerManagerType;
|
||||
data.windowLayerManagerRemote = winUtils.layerManagerRemote;
|
||||
data.supportsHardwareH264 = winUtils.supportsHardwareH264Decoding;
|
||||
|
|
Загрузка…
Ссылка в новой задаче