summaryrefslogtreecommitdiffstats
path: root/gfx/tests/browser
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /gfx/tests/browser
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/tests/browser')
-rw-r--r--gfx/tests/browser/browser.ini4
-rw-r--r--gfx/tests/browser/browser_windowless_troubleshoot_crash.js45
2 files changed, 49 insertions, 0 deletions
diff --git a/gfx/tests/browser/browser.ini b/gfx/tests/browser/browser.ini
new file mode 100644
index 000000000..0a1902f0e
--- /dev/null
+++ b/gfx/tests/browser/browser.ini
@@ -0,0 +1,4 @@
+[DEFAULT]
+support-files =
+
+[browser_windowless_troubleshoot_crash.js]
diff --git a/gfx/tests/browser/browser_windowless_troubleshoot_crash.js b/gfx/tests/browser/browser_windowless_troubleshoot_crash.js
new file mode 100644
index 000000000..f78a91c72
--- /dev/null
+++ b/gfx/tests/browser/browser_windowless_troubleshoot_crash.js
@@ -0,0 +1,45 @@
+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);
+ });
+ });
+
+ ok(data.graphics.windowLayerManagerType !== "None", "windowless browser window should not set windowLayerManagerType to 'None'");
+
+ webNav.close();
+});