XPCShell tests don't work with ChromeWorkers

NEW
Unassigned

Status

5 years ago
4 years ago

People

(Reporter: fitzgen, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

Created attachment 810831 [details] [diff] [review]
Patch that makes toolkit/devtools/server/tests/unit/test_pretty_print-*.js fail

I am re-writing the way that pretty printing in the debugger works so that the actual pretty printing is done inside a ChromeWorker.

With manual testing, my builds look good. My tests are passing in mochitest. However, the xpcshell tests are failing in nsHandlerService.js:

 0:01.24 file:///Users/fitzgen/src/mozilla-central/obj.noindex/dist/bin/components/nsHandlerService.js:891: exception: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get]
 0:01.24 
 0:01.24 TEST-UNEXPECTED-FAIL | /Users/fitzgen/src/mozilla-central/obj.noindex/_tests/xpcshell/toolkit/devtools/server/tests/unit/head_dbg.js | head_dbg.js got console message: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get]
 - See following stack:
JS frame :: /Users/fitzgen/src/mozilla-central/obj.noindex/_tests/xpcshell/toolkit/devtools/server/tests/unit/head_dbg.js :: listener.observe :: line 93
native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
 0:01.24 
 0:01.24 TEST-INFO | (xpcshell/head.js) | exiting test
 0:01.24 TEST-UNEXPECTED-FAIL | /Users/fitzgen/src/mozilla-central/obj.noindex/_tests/xpcshell/toolkit/devtools/server/tests/unit/test_pretty_print-01.js | test failed (with xpcshell return code: 0)
Created attachment 810832 [details]
Full test log
Created attachment 810864 [details] [diff] [review]
chrome-worker-failing.patch

This is a smaller test case, but has a different failure message:

 0:00.33 TEST-UNEXPECTED-FAIL | /Users/fitzgen/src/mozilla-central/obj.noindex/_tests/xpcshell/toolkit/devtools/server/tests/unit/test_chrome_worker.js | Error: Failed to construct base URI! at /Users/fitzgen/src/mozilla-central/obj.noindex/_tests/xpcshell/toolkit/devtools/server/tests/unit/test_chrome_worker.js:8 - See following stack:

JS frame :: /Users/fitzgen/src/mozilla-central/obj.noindex/_tests/xpcshell/toolkit/devtools/server/tests/unit/test_chrome_worker.js :: run_test :: line 8
JS frame :: _execute_test@/Users/fitzgen/src/mozilla-central/testing/xpcshell/head.js:348
JS frame :: -e :: anonymous :: line 1
 0:00.34 TEST-UNEXPECTED-FAIL | /Users/fitzgen/src/mozilla-central/obj.noindex/_tests/xpcshell/toolkit/devtools/server/tests/unit/test_chrome_worker.js | test failed (with xpcshell return code: 0)
I don't know anything about ChromeWorkers. Maybe there's something they're expecting to exist that isn't configured properly in the xpcshell environment?
You need to log in before you can comment on or make changes to this bug.