Closed
Bug 1092587
Opened 11 years ago
Closed 11 years ago
TypeError: Promise.defer is not a function, causing browser chrome failures
Categories
(Toolkit :: Async Tooling, defect)
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: jmaher, Assigned: jmaher)
References
Details
Attachments
(1 file)
|
16.07 KB,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
I was running some browser-chrome tests locally and found that many tests are failing. In fact I see this on try when I run by dir (bug 1057512) on try:
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=7cf246496afc
I can reproduce this locally easily with and no patches, just a fresh m-i checkout:
./mach mochitest-browser browser/base/content/test/chat
Here are some errors I see:
[13072] WARNING: Attempt to add property GnomeProgram::default-icon after class was initialised: 'glib warning', file /home/jmaher/mozilla/mozilla-inbound/toolkit/xre/nsSigHandlers.cpp, line 140
(firefox:13072): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised
-*- Webapps.jsm : Exception running app migration:
-*- Webapps.jsm : TypeError Components.classes['@mozilla.org/app-migrator;1'] is undefined
-*- Webapps.jsm : Skipping app migration.
-*- Webapps.jsm : Saving /tmp/tmp_GlpiC.mozrunner/webapps/webapps.json
-*- Webapps.jsm : Saving /tmp/tmp_GlpiC.mozrunner/webapps/webapps.json
-*- Webapps.jsm : Success saving /tmp/tmp_GlpiC.mozrunner/webapps/webapps.json
-*- Webapps.jsm : Success saving /tmp/tmp_GlpiC.mozrunner/webapps/webapps.json
0 INFO *** Start BrowserChrome Test Results ***
1 INFO checking window state
must wait for focus
2 INFO TEST-START | chrome://mochitests/content/browser/browser/base/content/test/chat/browser_chatwindow.js
3 INFO Entering test
4 INFO Starting chat test testOpenCloseChat
*************************
A coding exception was thrown and uncaught in a Task.
Full message: TypeError: Promise.defer is not a function
Full stack: promiseOpenChat@chrome://mochitests/content/browser/browser/base/content/test/chat/head.js:13:18
testOpenCloseChat@chrome://mochitests/content/browser/browser/base/content/test/chat/browser_chatwindow.js:8:23
Tester_execTest@chrome://mochikit/content/browser-test.js:645:9
Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:571:7
SimpleTest.waitForFocus/maybeRunTests/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:683:49
*************************
5 INFO Finished chat test testOpenCloseChat - cleaning up.
*************************
A coding exception was thrown and uncaught in a Task.
Full message: TypeError: Promise.defer is not a function
Full stack: promiseOpenChat@chrome://mochitests/content/browser/browser/base/content/test/chat/head.js:13:18
testOpenCloseChat@chrome://mochitests/content/browser/browser/base/content/test/chat/browser_chatwindow.js:8:23
Tester_execTest@chrome://mochikit/content/browser-test.js:645:9
Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:571:7
SimpleTest.waitForFocus/maybeRunTests/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:683:49
Tester_execTest@chrome://mochikit/content/browser-test.js:645:9
Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:571:7
SimpleTest.waitForFocus/maybeRunTests/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:683:49
*************************
I assume this is something we are changing fundamentally in the browser or some libraries and it will get fixed soon. Otherwise, I see the need to disable a lot of tests.
| Assignee | ||
Comment 1•11 years ago
|
||
Yoric, I recall you doing some work on promises recently, can you comment as to what you think might be going on here?
Flags: needinfo?(dteller)
Comment 2•11 years ago
|
||
This is clearly caused by bug 1083989. What's weird is that it should orange everywhere, not just for you.
Are you sure that you have the latest m-c?
Flags: needinfo?(dteller)
| Assignee | ||
Comment 3•11 years ago
|
||
I just pulled again from mozilla-inbound, built, and ran "./mach mochitest-browser browser/base/content/test/chat" with the same errors as originally reported.
according to the try push, I would expect this on all platforms (I run on linux 64, opt build)
| Assignee | ||
Comment 4•11 years ago
|
||
Mark, I found you as the original author of browser_chatwindow.js, I cannot get this to run for me (nor any of the chat tests) on a local build via:
./mach mochitest-browser browser/base/content/test/chat
I would be inclined to turn off these tests, but would like to hear from somebody who authored them.
Flags: needinfo?(mhammond)
| Assignee | ||
Comment 5•11 years ago
|
||
ok, I overlooked Yoric's comment about this being related to bug 1083989. The reason this is probably only seen on browser-chrome is that is the only jobs running in --run-by-dir mode. The rest are running as they have been for and are on current automation.
Yoric, is this an issue you are actively working on? Is there direction and guidance you could give to help me or someone else speed this up?
Flags: needinfo?(mhammond) → needinfo?(dteller)
Comment 6•11 years ago
|
||
I am not working actively on this atm.
However, the fix is pretty simple: add
Components.utils.import("resource://gre/modules/Promise.jsm", this)
in the failing tests.
Flags: needinfo?(dteller)
| Assignee | ||
Comment 7•11 years ago
|
||
Yoric, please let me know if I should get others to review as well and or solve this a different way.
Comment 8•11 years ago
|
||
Comment on attachment 8517564 [details] [diff] [review]
add promises.jsm to all tests which appear to need promises.defer (1.0)
Review of attachment 8517564 [details] [diff] [review]:
-----------------------------------------------------------------
That looks good.
Thanks for handling this.
Attachment #8517564 -
Flags: review?(dteller) → review+
| Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 9•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla36
You need to log in
before you can comment on or make changes to this bug.
Description
•