Closed Bug 327163 Opened 20 years ago Closed 19 years ago

Various tests fail in TestCookie

Categories

(Core :: Networking: Cookies, defect)

defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 338332

People

(Reporter: Biesinger, Assigned: darin.moz)

References

Details

Attachments

(1 file)

$ ./run-mozilla.sh ./TestCookie 2>&1 |grep FAIL *** tests 5 6 FAILED! *** tests 4 8 9 10 FAILED! *** tests 4 5 6 9 10 12 FAILED! *** tests 0 1 2 4 6 10 12 FAILED! *** tests 8 FAILED! *** tests 2 4 5 7 11 12 13 FAILED! *** tests 1 4 FAILED! *** tests 0 1 2 4 5 6 FAILED! *** Result: TEST(S) FAILED! Either the tests show a bug, or the test is wrong...
i haven't looked at the tests in a while but when i wrote them, they used to all pass.
We're failing because cookie.get() is "" instead of NULL. And that's not that surprising -- the glue nsCString version is not at all the same things as nsXPIDLCString. That's fallout from bug 315087, which changed the string type.
Blocks: 315087
Flags: blocking1.9a1+
i wonder if javascript requires this NULL behavior, or if we can just rework the consumers to deal with the empty string...
What does JS have to do with this? TestCookie is a C++ file....
er, sorry. i thought you meant nsCookieService had been changed to use CStrings; nevermind.
OK, so we either need to change the test to expect something different, or we need to change the test to use a different string type, or we need to change the behavior of nsCString here. I'm going to assume the first of these is what we want and will attach a patch.
With this, I pass the tests.
Attachment #226608 - Flags: superreview?(darin)
Attachment #226608 - Flags: review?(darin)
this is a duplicate of bug 338332, which davel already patched weeks ago, but his patch just never made it into the tree :-( *** This bug has been marked as a duplicate of 338332 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Attachment #226608 - Flags: superreview?(darin)
Attachment #226608 - Flags: review?(darin)
Flags: blocking1.9a1+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: