Closed
Bug 491936
Opened 16 years ago
Closed 15 years ago
Create tests for NetUtil.jsm
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: bzbarsky, Assigned: sdwilsh)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
See bug 482310
Assignee | ||
Comment 1•15 years ago
|
||
So, this fixes NetUtil.jsm to actually export and contains a test that writes to a file. The problem being that I'm hitting this assertion and I think the NetUtil code is doing something wrong:
http://mxr.mozilla.org/mozilla-central/source/netwerk/base/src/nsFileStreams.cpp#448
bz - any thoughts/hints?
Reporter | ||
Comment 2•15 years ago
|
||
I think that assertion is bogus and should go away. In particular, it'll trigger any time someone tests whether the file output stream is buffered!
biesi, any objections to removing those asserts?
Comment 3•15 years ago
|
||
fair enough. the error return value should be good enough indication.
Assignee | ||
Comment 4•15 years ago
|
||
Removing that assertion passes the test :)
Attachment #392633 -
Attachment is obsolete: true
Attachment #392746 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs review bz]
Reporter | ||
Updated•15 years ago
|
Attachment #392746 -
Flags: review?(bzbarsky) → review+
Reporter | ||
Comment 5•15 years ago
|
||
Comment on attachment 392746 [details] [diff] [review]
v1.1
>+++ b/netwerk/base/src/NetUtil.jsm
Thank you for fixing the obvious errors here! I have no idea what I was thinking when I wrote that.
>+++ b/netwerk/test/unit/test_NetUtil.js
>+function test_async_write_file()
>+ file.createUnique(Ci.nsIFile.NORMAL_FIEL_TYPE, 0666);
S/FIEL/FILE/, right?
Happened to work because undefined converts to 0, which happens to be NORMAL_FILE_TYPE.
With that fixed, looks good.
Assignee | ||
Comment 6•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs review bz]
Target Milestone: --- → mozilla1.9.2a1
You need to log in
before you can comment on or make changes to this bug.
Description
•