Closed
Bug 1215846
Opened 10 years ago
Closed 10 years ago
Replace JS1.7 legacy generators with ES6 generators in toolkit/components/places
Categories
(Toolkit :: General, defect)
Toolkit
General
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: evilpies, Assigned: evilpies)
References
Details
Attachments
(3 files, 1 obsolete file)
120.35 KB,
patch
|
mak
:
review+
|
Details | Diff | Splinter Review |
4.24 KB,
patch
|
evilpies
:
review+
|
Details | Diff | Splinter Review |
14.61 KB,
patch
|
mak
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Please have a look at toolkit/components/places/tests/unit/test_history_notifications.js, with this patch the test fails, but as far as I can tell it never executed before.
Attachment #8678472 -
Flags: review?(mak77)
Comment 2•10 years ago
|
||
(In reply to Tom Schuster [:evilpie] from comment #1)
> Please have a look at
> toolkit/components/places/tests/unit/test_history_notifications.js, with
> this patch the test fails, but as far as I can tell it never executed before.
Mixing up add_task and do_test_pending is not a great idea, they are 2 different ways to manage async tests (one new, one old) and I suspect they don't work well together at all, I think I may also have filed a bug in the past to explicitly fail tests mixing the two systems.
You should remove run_test completely and change the test to properly yield on a promise.
Why do you think it never executed? wouldn't it timeout due to do_test_pending if it didn't run to completion?
Flags: needinfo?(evilpies)
Comment 3•10 years ago
|
||
Comment on attachment 8678472 [details] [diff] [review]
Replace legacy generators in toolkit/components/places
Review of attachment 8678472 [details] [diff] [review]:
-----------------------------------------------------------------
apart from what I said in previous comment, the other changes look good.
Attachment #8678472 -
Flags: review?(mak77) → review+
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Marco Bonardo [::mak] from comment #2)
> You should remove run_test completely and change the test to properly yield
> on a promise.
I have zero ideas how that would look like.
> Why do you think it never executed? wouldn't it timeout due to
> do_test_pending if it didn't run to completion?
I think that, because it doesn't produce any output and it's basically only two lines.
0:00.48 LOG: Thread-1 INFO (xpcshell/head.js) | test MAIN run_test pending (1)
0:00.48 LOG: Thread-1 INFO (xpcshell/head.js) | test MAIN run_test finished (1)
Removing do_test_finished() from the test doesn't change anything. Adding do_check_true(false) before it doesn't either.
Flags: needinfo?(evilpies)
Comment 5•10 years ago
|
||
Sorry I forgot about this, let me try to fix that test locally.
Flags: needinfo?(mak77)
Comment 6•10 years ago
|
||
this should do
Flags: needinfo?(mak77)
Attachment #8683619 -
Flags: review?(evilpies)
Comment 7•10 years ago
|
||
Comment on attachment 8683619 [details] [diff] [review]
fix test_history_notifications.js
ehr I forgot a qref
Attachment #8683619 -
Attachment is obsolete: true
Attachment #8683619 -
Flags: review?(evilpies)
Comment 8•10 years ago
|
||
Attachment #8683626 -
Flags: review?(evilpies)
Assignee | ||
Updated•10 years ago
|
Summary: Replace JS1.7 legacy generators with ES6 generators in toolkit/ → Replace JS1.7 legacy generators with ES6 generators in toolkit/components/places
Assignee | ||
Comment 9•10 years ago
|
||
Comment on attachment 8683626 [details] [diff] [review]
fix test_history_notifications.js
Review of attachment 8683626 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you for helping me out!
::: toolkit/components/places/tests/unit/test_history_notifications.js
@@ -65,5 @@
>
> - // Make sure that the incorrectly opened service is closed before
> - // we make another attempt. Otherwise, there will be a conflict between
> - // the two services (and an assertion failure).
> - yield shutdownPlaces();
So this is not needed anymore?
Attachment #8683626 -
Flags: review?(evilpies) → review+
Comment 10•10 years ago
|
||
I didn't notice any issues without it, so I guess it's not needed anymore.
Assignee | ||
Comment 11•10 years ago
|
||
Ups, seems like I forgot to update places/tests/browser/browser_colorAnalyzer.js properly.
Assignee | ||
Comment 12•10 years ago
|
||
Attachment #8683860 -
Flags: review?(mak77)
Comment 13•10 years ago
|
||
Comment on attachment 8683860 [details] [diff] [review]
fix browser_colorAnalyzer
Review of attachment 8683860 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/components/places/tests/browser/browser_colorAnalyzer.js
@@ +58,1 @@
> // simple test - draw a red box in the center, make sure we get red back
nit: you added some newlines here and there that don't look useful off-hand
@@ -316,5 @@
> - }, function(actual) {
> - info("perfBigImage: " + ((new Date()) - t1) + "ms");
> - nextStep();
> - }, "", true);
> -});
why did you just remove the perf tests? I think someone added them to annotate them somewhere (this code is in Places but it shouldn't, so I can't give reasoning)... what about just commenting them out?
Attachment #8683860 -
Flags: review?(mak77) → review+
Comment 14•10 years ago
|
||
Assignee | ||
Comment 15•10 years ago
|
||
The way the test was written doesn't work well with yield and promises. And performance tests in normal test suites are usually a bad idea anyway. If somebody wants the code back they can just look at the history.
![]() |
||
Comment 16•10 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/66f266ae55b7
https://hg.mozilla.org/mozilla-central/rev/1b5c3d2306da
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•