Skip to content

Commit

Permalink
Adding diagnostic providers to collect Firefox and Selenium IDE data
Browse files Browse the repository at this point in the history
  • Loading branch information
samitbadle committed Sep 29, 2014
1 parent fe14550 commit 23f0a8a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ide/main/src/content/health/firefox-diagnostics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

if (HealthService && HealthService.addDiagnostic) {
HealthService.addDiagnostic('Browser', {
runDiagnostic: function() {
var appinfo = Services.appinfo;
return {
os: appinfo.OS,
name: appinfo.name,
version: appinfo.version,
ID: appinfo.ID,
vendor: appinfo.vendor,
platformBuildID: appinfo.platformBuildID,
platformVersion: appinfo.platformVersion,
userAgent: window.navigator.userAgent
};
}
});
} else {
alert("Cannot add Browser diagnostic provider to HealthService");
}
17 changes: 17 additions & 0 deletions ide/main/src/content/health/selenium-ide-diagnostics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

if (HealthService && HealthService.addDiagnostic) {
HealthService.addDiagnostic('SeleniumIDE', {
runDiagnostic: function() {
var version = Components.classes["@mozilla.org/intl/stringbundle;1"]
.getService(Components.interfaces.nsIStringBundleService)
.createBundle("chrome://selenium-ide/locale/selenium-ide.properties").GetStringFromName('selenium-ide.version');
var isSidebar = document.getElementById("selenium-ide-sidebar") ? true : false;
return {
version: version,
sidebar: isSidebar
};
}
});
} else {
alert("Cannot add SeleniumIDE diagnostic provider to HealthService");
}

0 comments on commit 23f0a8a

Please sign in to comment.