mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 843980 - Switch tests to check for category entries, not service existence. r=mconnor
This commit is contained in:
parent
c878d63b6a
commit
8ba9584d11
@ -110,12 +110,15 @@ let gTests = [
|
||||
desc: "Check that performing a search records to Firefox Health Report.",
|
||||
setup: function () { },
|
||||
run: function () {
|
||||
if (!("@mozilla.org/datareporting/service;1" in Components.classes)) {
|
||||
try {
|
||||
let cm = Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager);
|
||||
cm.getCategoryEntry("healthreport-js-provider", "SearchesProvider");
|
||||
} catch (ex) {
|
||||
// Health Report disabled, or no SearchesProvider.
|
||||
runNextTest();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let doc = gBrowser.contentDocument;
|
||||
|
||||
// We rely on the listener in browser.js being installed and fired before
|
||||
|
@ -26,7 +26,12 @@ function test() {
|
||||
container.removeEventListener("TabOpen", tabAdded, false);
|
||||
tabs.forEach(gBrowser.removeTab, gBrowser);
|
||||
|
||||
if (!"@mozilla.org/datareporting/service;1" in Components.classes) {
|
||||
try {
|
||||
let cm = Components.classes["@mozilla.org/categorymanager;1"]
|
||||
.getService(Components.interfaces.nsICategoryManager);
|
||||
cm.getCategoryEntry("healthreport-js-provider", "SearchesProvider");
|
||||
} catch (ex) {
|
||||
// Health Report disabled, or no SearchesProvider.
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
@ -5,8 +5,11 @@
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
if (!("@mozilla.org/datareporting/service;1" in Cc)) {
|
||||
try {
|
||||
let cm = Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager);
|
||||
cm.getCategoryEntry("healthreport-js-provider", "SearchesProvider");
|
||||
} catch (ex) {
|
||||
// Health Report disabled, or no SearchesProvider.
|
||||
ok(true, "Firefox Health Report is not enabled.");
|
||||
finish();
|
||||
return;
|
||||
|
@ -6,7 +6,12 @@
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
if (!("@mozilla.org/datareporting/service;1" in Components.classes)) {
|
||||
try {
|
||||
let cm = Components.classes["@mozilla.org/categorymanager;1"]
|
||||
.getService(Components.interfaces.nsICategoryManager);
|
||||
cm.getCategoryEntry("healthreport-js-provider", "SearchesProvider");
|
||||
} catch (ex) {
|
||||
// Health Report disabled, or no SearchesProvider.
|
||||
// We need a test or else we'll be marked as failure.
|
||||
ok(true, "Firefox Health Report is not enabled.");
|
||||
finish();
|
||||
|
Loading…
Reference in New Issue
Block a user