Remove osfile.jsm usage from browser/base/content/test/performance/ tests
Categories
(Firefox :: General, 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/performance/
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/performance/
. 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•3 years ago
|
||
Hello,
After making the necessary changes for this bug, i run the test ./mach mochitest browser/base/content/test/performance/
and this was part of the output
Browser Chrome Test Summary
Passed: 135
Failed: 2
Todo: 7
Mode: e10s
*** End BrowserChrome Test Results ***
4:25.75 INFO Buffered messages finished
4:25.75 SUITE_END
4:25.75
Overall Summary
===============
mochitest-browser
~~~~~~~~~~~~~~~~~
Ran 169 checks (144 subtests, 25 tests)
Expected results: 161
Skipped: 6 tests
Unexpected results: 2
subtest: 2 (2 fail)
Unexpected Results
------------------
browser/base/content/test/performance/browser_startup_content_mainthreadio.js
FAIL This test requires a packaged build, run 'mach package' and then use --appname=dist -
Stack trace:
chrome://mochikit/content/browser-test.js:test_ok:1336
chrome://mochitests/content/browser/browser/base/content/test/performance/browser_startup_content_mainthreadio.js:null:253
chrome://mochikit/content/browser-test.js:Tester_execTest/<:1091
chrome://mochikit/content/browser-test.js:Tester_execTest:1131
chrome://mochikit/content/browser-test.js:nextTest/<:939
chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1041
browser/base/content/test/performance/browser_startup_mainthreadio.js
FAIL This test requires a packaged build, run 'mach package' and then use --appname=dist -
Stack trace:
chrome://mochikit/content/browser-test.js:test_ok:1336
chrome://mochitests/content/browser/browser/base/content/test/performance/browser_startup_mainthreadio.js:null:657
chrome://mochikit/content/browser-test.js:Tester_execTest/<:1091
chrome://mochikit/content/browser-test.js:Tester_execTest:1131
chrome://mochikit/content/browser-test.js:nextTest/<:939
chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1041
`
Assignee | ||
Comment 2•3 years ago
|
||
I run ./mach package
then
./mach mochitest --appname=dist browser/base/content/test/performance/browser_startup_content_mainthreadio.js
And it was successful
Don't know if it cut it for the test.
Thanks
Reporter | ||
Comment 3•3 years ago
|
||
If that second sequence was successful, then that's fine :)
Assignee | ||
Comment 4•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
Hello,
I did this await IOUtils.writeJSON(profilePath, startupRecorder.data.profile);
and run ./mach eslint browser/base/content/test/performance/
And got this error message
c:/mozilla-source/mozilla-unified/browser/base/content/test/performance/browser_startup_content_mainthreadio.js
443:9 error 'encoder' is assigned a value but never used. no-unused-vars (eslint)
c:/mozilla-source/mozilla-unified/browser/base/content/test/performance/browser_startup_mainthreadio.js
887:9 error 'encoder' is assigned a value but never used. no-unused-vars (eslint)
c:/mozilla-source/mozilla-unified/browser/base/content/test/performance/browser_startup_syncIPC.js
407:9 error 'encoder' is assigned a value but never used. no-unused-vars (eslint)
✖ 3 problems (3 errors, 0 warnings, 0 fixed)
Assignee | ||
Comment 6•3 years ago
|
||
What should i do?
let encoder = new TextEncoder();
Reporter | ||
Comment 7•3 years ago
|
||
Since you've removed the use of encoder
then you can remove the let encoder = new TextEncoder();
line - it isn't needed any more.
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ef346aadf589 Replaced OS.File with IOUtils in browser/base/content/test/performance/ r=Standard8
Comment 9•3 years ago
|
||
bugherder |
Description
•