Closed
Bug 684230
Opened 13 years ago
Closed 13 years ago
test_bug434998.xul throws an exception
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
FIXED
mozilla9
People
(Reporter: arno, Assigned: arno)
References
Details
Attachments
(1 file, 1 obsolete file)
1.04 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
Hi,
when patch for bug 678842 is applied, an error is thrown when running mochitest-chrome for editor/composer.
10 INFO TEST-INFO | chrome://mochitests/content/chrome/editor/composer/test/test_bug678842.html | [SimpleTest/SimpleTest.js, window.onerror] An error occurred: ok is not a function at chrome://mochitests/content/chrome/editor/composer/test/test_bug434998.xul:66
This probably did not happen before because test_bug434998.xul was the last one in chrome tests. Now, that there is a new chrome test, for whatever reason, the progresslistener onStateChange is called another time, when executing the next test.
Patch seems to be quite easy:
just call
progress.removeProgressListener(progressListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
before SimpleTest.finish().
But two questions come in my mind ?
* Why is code of one test executed when another test is in progress ?
* I noticed that on try server (probably also on inbound and central), a lot of mochitest pass while having some javascript execption uncatched. Shouldn't mochitest fail in that case ?
Assignee | ||
Comment 1•13 years ago
|
||
patch proposal
Assignee: nobody → arno
Attachment #558313 -
Flags: review?(ehsan)
Comment 2•13 years ago
|
||
(In reply to arno renevier from comment #0)
> Hi,
> when patch for bug 678842 is applied, an error is thrown when running
> mochitest-chrome for editor/composer.
>
> 10 INFO TEST-INFO |
> chrome://mochitests/content/chrome/editor/composer/test/test_bug678842.html
> | [SimpleTest/SimpleTest.js, window.onerror] An error occurred: ok is not a
> function at
> chrome://mochitests/content/chrome/editor/composer/test/test_bug434998.xul:66
>
> This probably did not happen before because test_bug434998.xul was the last
> one in chrome tests. Now, that there is a new chrome test, for whatever
> reason, the progresslistener onStateChange is called another time, when
> executing the next test.
>
> Patch seems to be quite easy:
> just call
> progress.removeProgressListener(progressListener,
> Components.interfaces.nsIWebProgress.NOTIFY_ALL);
> before SimpleTest.finish().
Yes, that is the right idea.
> But two questions come in my mind ?
> * Why is code of one test executed when another test is in progress ?
Probably because the listener is catching the next pageload in this case... But the ok function is now gone away because the script object from the previous page has been destroyed. At least, that's what I think is happening!
> * I noticed that on try server (probably also on inbound and central), a lot
> of mochitest pass while having some javascript execption uncatched.
> Shouldn't mochitest fail in that case ?
Can you file bugs on individual examples? The way that the mochitest framework works is that it loads a file, waits for the load to be finished, then checks a flag to see if the test has requested an explicit finish. If that flag is set, it waits for a call to finish, otherwise it assumes that the test is finished and loads the next file. If the js exception causes the execution sequence ultimately leading to finish being called to be aborted, then the test will time out. I'm not sure if the framework tries to catch js exceptions explicitly though...
Comment 3•13 years ago
|
||
Comment on attachment 558313 [details] [diff] [review]
progressListener at the end of test
Wrong patch. :-)
Attachment #558313 -
Attachment is obsolete: true
Attachment #558313 -
Flags: review?(ehsan)
Assignee | ||
Comment 4•13 years ago
|
||
Attachment #558324 -
Flags: review?(ehsan)
Updated•13 years ago
|
Attachment #558324 -
Flags: review?(ehsan) → review+
Comment 5•13 years ago
|
||
Target Milestone: --- → mozilla9
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.
Description
•