Remove osfile.jsm usage from browser/base/content/test/tabcrashed/browser_aboutRestartRequired_buildid.js test
Categories
(Firefox :: Tabbed Browser, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox95 | --- | fixed |
People
(Reporter: standard8, Assigned: onuohaoluebube05, Mentored)
References
Details
(Whiteboard: [lang=js][good-next-bug])
Attachments
(1 file)
Using OS.File for file access is now obsolete and can be replaced by code using IOUtils. Working towards this, we want ore move all OS.* usage from browser/base/content/test/tabcrashed/browser_aboutRestartRequired_buildid.js
The code in question can be found here.
There is background information here about how to migrate from OS.File to IOUtils. If you have questions, please ask.
OS.Path.join can be simply replaced by PathUtils.join.
To run the tests after you've built, you can run ./mach mochitest browser/base/content/test/tabcrashed/browser_aboutRestartRequired_buildid.js. You should also check ESLint before commiting: ./mach eslint browser/base/content/test/performance/.
I'm happy to mentor this. Note this bug will be auto-assigned when the first patch is attached.
| Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
| Assignee | ||
Comment 2•4 years ago
|
||
Hello,
I run this
./mach mochitest browser/base/content/test/tabcrashed/browser_aboutRestartRequired_buildid.js
Got this error
Unexpected Results
------------------
browser/base/content/test/tabcrashed/browser_aboutRestartRequired_buildid.js
FAIL Timed out waiting oop-browser-crashed (false-positive) event -
Stack trace:
chrome://mochikit/content/browser-test.js:test_ok:1336
chrome://mochitests/content/browser/browser/base/content/test/tabcrashed/head.js:getEventPromise/</maybeTimeout<:172
FAIL Uncaught exception -
FAIL Uncaught exception - NotFoundError: Could not open the file at C:\mozilla-source\mozilla-unified\objdir-frontend\dist\bin\platform.ini
FAIL Uncaught exception - NotFoundError: Could not open the file at C:\mozilla-source\mozilla-unified\objdir-frontend\dist\bin\platform.ini
| Assignee | ||
Comment 3•4 years ago
|
||
I dont know if it is safe to remove const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm"); since we are no longer using OS.File
I submitted a patch so you can view the changes i have made so far and guide me on the next step forward
Thanks.
| Reporter | ||
Comment 4•4 years ago
|
||
(In reply to onuohaoluebube05 from comment #2)
I run this
./mach mochitest browser/base/content/test/tabcrashed/browser_aboutRestartRequired_buildid.jsGot this error
It took me a while, but I realised this test is skipped if you are on a non-debug build. I tried it on a debug build, and I still got a timeout, so I've pushed it to our try server to check if it runs properly there (it'll take the results a little while to be returned): https://treeherder.mozilla.org/jobs?repo=try&revision=782de8e50bb0eafeb871cf6ab6bcdaa5ea93624f
(In reply to onuohaoluebube05 from comment #3)
I dont know if it is safe to remove
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");since we are no longer using OS.File
Yes it is safe to remove that as it is no longer used in that file.
| Reporter | ||
Comment 5•4 years ago
|
||
I re-did the try build, as it needed a full debug build, not just an artifact one: https://treeherder.mozilla.org/jobs?repo=try&revision=a58317a3099bfedf57e514930800ab1764feec22
So I think this is good now :)
Comment 7•4 years ago
|
||
| bugherder | ||
Description
•