Last Comment Bug 759789 - content/base/test/test_bug435425.html ran additional tests after finish() was called
: content/base/test/test_bug435425.html ran additional tests after finish() was...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: Mats Palmgren (:mats)
:
Mentors:
Depends on:
Blocks: 451287 486247
  Show dependency treegraph
 
Reported: 2012-05-30 09:17 PDT by Mats Palmgren (:mats)
Modified: 2012-06-02 12:02 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Don't move on to the next test (or finishing) until we get all expected non-optional 'loadend' events. (1.92 KB, patch)
2012-05-30 09:26 PDT, Mats Palmgren (:mats)
bugs: review+
Details | Diff | Splinter Review

Description Mats Palmgren (:mats) 2012-05-30 09:17:57 PDT
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.
Comment 1 Mats Palmgren (:mats) 2012-05-30 09:26:19 PDT
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 2 Mats Palmgren (:mats) 2012-05-30 13:06:42 PDT
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
Comment 3 Olli Pettay [:smaug] (vacation Aug 25-28) 2012-05-31 11:08:46 PDT
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 :)

Note You need to log in before you can comment on or make changes to this bug.