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

RESOLVED FIXED in mozilla15

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Mats Palmgren (vacation - back in August), Assigned: Mats Palmgren (vacation - back in August))

Tracking

(Blocks: 1 bug)

Trunk
mozilla15
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.
Created attachment 628357 [details] [diff] [review]
Don't move on to the next test (or finishing) until we get all expected non-optional 'loadend' events.

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
Blocks: 451287

Comment 3

5 years ago
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+
https://hg.mozilla.org/integration/mozilla-inbound/rev/51db62de8677
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/51db62de8677
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.