Closed
Bug 676394
Opened 13 years ago
Closed 13 years ago
Simpletest.finish needs to be wrapped in a settimeout after changing a pref
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: martijn.martijn, Unassigned)
References
Details
Attachments
(2 files)
4.18 KB,
patch
|
dbaron
:
review-
|
Details | Diff | Splinter Review |
2.38 KB,
patch
|
dbaron
:
review-
|
Details | Diff | Splinter Review |
Test_bug580685.html is failing for me in Fennec. test_bug401046.html is one of the causes, see testcase here: http://people.mozilla.com/~mwargers/mochitestjs/parent580685.html You need to have the specialpowers extension installed for this testcase: http://people.mozilla.com/~mwargers/mochitestjs/specialpowers.xpi This testcase works in Firefox desktop, but not in Fennec. I guess because of e10s. Specialpowers.setIntPref, etc is apparently really async there. The attached patch fixes the cases where Specialpowers prefs are set and where Simpletest.finish() is called immediately after that. This makes test_pixel_lengths.html also pass in Fennec mochitest, where it was failing previously. After these changes, test_bug580685.html is passing for me in Fennec mochitest. On Firefox mochitest, these mochitests keep passing for me. This was test on Windows.
Attachment #550527 -
Flags: review?(dbaron)
Comment 1•13 years ago
|
||
I suspect this is related to bug 621363
Reporter | ||
Comment 2•13 years ago
|
||
test_dont_use_document_colors.html also needs a similar treatment. This was the first test where I really had to use the double timer. setTimeout(part2, 0); was causing failures, after changing it to: setTimeout(setTimeout, 0, part2, 0); all the tests passed on Fennec. To be sure, I changed the other timer too in this patch.
Attachment #550665 -
Flags: review?(dbaron)
It seems like we need a function that sets a preference (or maybe a set of preferences) and calls a callback function when the preference change has taken effect. I'd think such a function would be quite useful for other things in tests that use preferences as well. That would also be much clearer than these setTimeout tricks.
Reporter | ||
Comment 4•13 years ago
|
||
There is some talk about something in bug 621363, not sure what, but that would fix this in a different way. So let's close it out as invalid then.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Attachment #550665 -
Flags: review?(dbaron) → review-
Attachment #550527 -
Flags: review?(dbaron) → review-
Reporter | ||
Comment 5•13 years ago
|
||
So I guess, instead of adding timers to preference setting, the current timers to preference setting should be removed, once bug 621363 is fixed.
Depends on: 621363
You need to log in
before you can comment on or make changes to this bug.
Description
•