Closed Bug 759789 Opened 13 years ago Closed 13 years ago

content/base/test/test_bug435425.html ran additional tests after finish() was called

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

References

Details

Attachments

(1 file)

Fallout from the diagnostic patch in bug 677964. with added logging when we call SimpleTest.finish() as FINISH: TEST-PASS | unknown test url | Extra or wrong event? TEST-PASS | unknown test url | Wrong event! - loadstart should equal loadstart TEST-PASS | unknown test url | Wrong event target [[object XMLHttpRequest],loadstart]! TEST-PASS | unknown test url | Extra or wrong event? TEST-PASS | unknown test url | Wrong event! - loadstart should equal loadstart TEST-PASS | unknown test url | Wrong event target [[object XMLHttpRequestUpload],loadstart]! TEST-PASS | unknown test url | Extra or wrong event? TEST-PASS | unknown test url | Wrong event! - error should equal error TEST-PASS | unknown test url | Wrong event target [[object XMLHttpRequest],error]! TEST-PASS | unknown test url | Extra or wrong event? TEST-PASS | unknown test url | Wrong event! - loadend should equal loadend TEST-PASS | unknown test url | Wrong event target [[object XMLHttpRequest],loadend]! TEST-PASS | unknown test url | FINISH TEST-PASS | unknown test url | Extra or wrong event? TEST-PASS | unknown test url | Wrong event! - error should equal error TEST-PASS | unknown test url | Wrong event target [[object XMLHttpRequestUpload],error]! TEST-PASS | unknown test url | Extra or wrong event? TEST-PASS | unknown test url | Wrong event! - loadend should equal loadend TEST-PASS | unknown test url | Wrong event target [[object XMLHttpRequestUpload],loadend]! http://mxr.mozilla.org/mozilla-central/source/content/base/test/test_bug435425.html?force=1#364 It appears the final test is expecting two "loadend" events, one for XHR and one for UPLOAD. The XHR "loadend" event handler calls stop() nextTest() SimpleTest.finish() http://mxr.mozilla.org/mozilla-central/source/content/base/test/test_bug435425.html?force=1#84 and from the log above it appears we get "error" and "loadend" for UPLOAD after that.
This works for me locally, but I should probably push this to Try before asking for review...
Comment on attachment 628357 [details] [diff] [review] Don't move on to the next test (or finishing) until we get all expected non-optional 'loadend' events. https://tbpl.mozilla.org/?usebuildbot=1&tree=Try&rev=b94c04bcd331
Attachment #628357 - Flags: review?(bugs)
Blocks: 486247
Comment on attachment 628357 [details] [diff] [review] Don't move on to the next test (or finishing) until we get all expected non-optional 'loadend' events. Hopefully this works :)
Attachment #628357 - Flags: review?(bugs) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: