Closed
Bug 1134186
Opened 10 years ago
Closed 9 years ago
Mock shellService in XPCSHELL tests for TelemetryEnvironment
Categories
(Firefox Health Report Graveyard :: Client: Desktop, defect)
Firefox Health Report Graveyard
Client: Desktop
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: Dexter, Unassigned)
References
Details
TelemetryEnvironment uses the shellService to detect if Firefox is the default browser. In XPCSHELL tests this is not possible. We should Mock shellService to get rid of the exception.
0:04.81 LOG: Thread-1 INFO "CONSOLE_MESSAGE: (warn) [JavaScript Error: "1424268147096 Toolkit.Telemetry ERROR TelemetryEnvironment::_isDefaultBrowser - Could not obtain shell service: TypeError: Cc['@mozilla.org/browser/shell-service;1'] is undefined (resource://gre/modules/TelemetryEnvironment.jsm:420:6) JS Stack trace: this.TelemetryEnvironment._isDefaultBrowser@TelemetryEnvironment.jsm:420:7 < this.TelemetryEnvironment._getSettings@TelemetryEnvironment.jsm:452:25 < this.TelemetryEnvironment._doGetEnvironmentData</sections.settings@TelemetryEnvironment.jsm:913:25 < this.TelemetryEnvironment._doGetEnvironmentData<@TelemetryEnvironment.jsm:926:25 < TaskImpl_run@Task.jsm:314:40 < TaskImpl_handleResultValue@Task.jsm:393:7 < TaskImpl_run@Task.jsm:322:13 < TaskImpl@Task.jsm:275:3 < createAsyncFunction/asyncFunction@Task.jsm:249:14 < this.TelemetryEnvironment.getEnvironmentData@TelemetryEnvironment.jsm:901:25 < test_checkEnvironment@test_TelemetryEnvironment.js:655:31 < TaskImpl_run@Task.jsm:314:40 < TaskImpl_handleResultValue@Task.jsm:393:7 < TaskImpl_run@Task.jsm:322:13 < TaskImpl@Task.jsm:275:3 < createAsyncFunction/asyncFunction@Task.jsm:249:14 < Task_spawn@Task.jsm:164:12 < _run_next_test@c:\\mozilla-source\\testing\\xpcshell\\head.js:1375:9 < do_execute_soon/<.run@c:\\mozilla-source\\testing\\xpcshell\\head.js:644:9 < _do_main@c:\\mozilla-source\\testing\\xpcshell\\head.js:207:5 < _execute_test@c:\\mozilla-source\\testing\\xpcshell\\head.js:504:5 < @-e:1:1" {file: "resource://gre/modules/Log.jsm" line: 749}]"
Reporter | ||
Updated•10 years ago
|
Assignee: nobody → alessio.placitelli
Updated•10 years ago
|
Reporter | ||
Updated•10 years ago
|
Updated•10 years ago
|
Reporter | ||
Updated•10 years ago
|
Assignee: alessio.placitelli → nobody
Comment 1•9 years ago
|
||
It makes more sense to add proper coverage for this with the upcoming marionette-based tests (bug 1168643).
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Updated•6 years ago
|
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•