Closed Bug 514843 Opened 15 years ago Closed 15 years ago

xpcshell unittest fails in file test_relation.js line 59 [Exception "Cannot modify properties of a WrappedNative"]

Categories

(Calendar :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ssitter, Assigned: Fallen)

Details

Attachments

(1 file)

TEST-UNEXPECTED-FAIL | d:\obj\sb-dbg\mozilla\_tests\xpcshell\test_calendar\unit\test_relation.js | test failed (with xpcshell return code: 0), see following log:

TEST-INFO | (xpcshell/head.js) | test 1 pending

JS Component Loader: WARNING file:///d:/obj/sb-dbg/mozilla/dist/bin/calendar-js/calAlarm.js:612 function getItemBundleStringName does not always return a value

JS Component Loader: WARNING file:///d:/obj/sb-dbg/mozilla/dist/bin/calendar-js/calAlarm.js:667 function cA_toString does not always return a value

TEST-PASS | d:/obj/sb-dbg/mozilla/_tests/xpcshell/test_calendar/unit/test_relation.js | [run_test : 56] 3 == 3

TEST-UNEXPECTED-FAIL | (xpcshell/head.js) | [Exception... "Cannot modify properties of a WrappedNative"  nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)"  location: "JS frame :: d:/obj/sb-dbg/mozilla/_tests/xpcshell/test_calendar/unit/test_relation.js :: run_test :: line 59"  data: no]
Attached patch Fix - v1 β€” β€” Splinter Review
We had quite a few problems with our tests. There is still one "problem" I couldn't fix, reproduce by running tests and then looking at the end of the log file of test_providers. The add item call seems to succeed, but calling getItems in the listener seems to fail.

We really need to hook up our tests to the tinderboxes...
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #398858 - Flags: review?(ssitter)
Attachment #398858 - Flags: review?(ssitter) → review+
Comment on attachment 398858 [details] [diff] [review]
Fix - v1

r=ssitter, test passes with the patch. I'd prefer to use full words for the variables, i.e. property/properties instead of prop/props.

Is the calAlarm.js change related to this unittest fix?

Please exclude the changes for non-existing files from the patch before commit, i.e. test_bug494140.js.
(In reply to comment #2)
> (From update of attachment 398858 [details] [diff] [review])
> r=ssitter, test passes with the patch. I'd prefer to use full words for the
> variables, i.e. property/properties instead of prop/props.
> 
> Is the calAlarm.js change related to this unittest fix?
Yes, kind of. It fixes the warnings mentioned in comment #0


> Please exclude the changes for non-existing files from the patch before commit,
> i.e. test_bug494140.js.
Sure, will do. Please pretend these bits are part of the patch for bug 494140.


Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/77a2d5493877>

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
OS: Windows 7 → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → 1.0
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Target Milestone: 1.0 → 1.0b1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: