Closed Bug 1126633 Opened 5 years ago Closed 5 years ago

Various mochitest-bc tests will fail when Gecko 38 merges to Aurora (TypeError: transitionProperties.includes is not a function)

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 38
Tracking Status
firefox37 --- verified
firefox38 + verified

People

(Reporter: RyanVM, Assigned: birtles)

References

Details

Attachments

(1 file)

[Tracking Requested - why for this release]: Test failures on the next merge day.

https://treeherder.mozilla.org/logviewer.html#?job_id=4502522&repo=try

11:31:53 INFO - 1235 INFO TEST-START | browser/components/places/tests/browser/browser_475045.js
11:31:53 INFO - *************************
11:31:53 INFO - A coding exception was thrown and uncaught in a Task.
11:31:53 INFO - Full message: TypeError: transitionProperties.includes is not a function
11:31:53 INFO - Full stack: promiseSetToolbarVisibility/<@chrome://mochitests/content/browser/browser/components/places/tests/browser/head.js:395:10
11:31:53 INFO - Promise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:354:5
11:31:53 INFO - promiseSetToolbarVisibility@chrome://mochitests/content/browser/browser/components/places/tests/browser/head.js:384:1
11:31:53 INFO - test@chrome://mochitests/content/browser/browser/components/places/tests/browser/browser_475045.js:16:11
11:31:53 INFO - Tester_execTest@chrome://mochikit/content/browser-test.js:667:9
11:31:53 INFO - Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:593:7
11:31:53 INFO - SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:750:59
11:31:53 INFO - *************************
11:31:53 INFO - 1236 INFO checking window state
11:31:53 INFO - 1237 INFO Entering test test
11:31:53 INFO - 1238 INFO TEST-PASS | browser/components/places/tests/browser/browser_475045.js | PersonalToolbar should not be null
11:31:53 INFO - 1239 INFO TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_475045.js | Uncaught exception - at chrome://mochitests/content/browser/browser/components/places/tests/browser/head.js:395 - TypeError: transitionProperties.includes is not a function
11:31:53 INFO - Stack trace:
11:31:53 INFO - promiseSetToolbarVisibility/<@chrome://mochitests/content/browser/browser/components/places/tests/browser/head.js:395:10
11:31:53 INFO - Promise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:354:5
11:31:53 INFO - promiseSetToolbarVisibility@chrome://mochitests/content/browser/browser/components/places/tests/browser/head.js:384:1
11:31:53 INFO - test@chrome://mochitests/content/browser/browser/components/places/tests/browser/browser_475045.js:16:11
11:31:53 INFO - Tester_execTest@chrome://mochikit/content/browser-test.js:667:9
11:31:53 INFO - Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:593:7
11:31:53 INFO - SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:750:59
11:31:53 INFO - Tester_execTest@chrome://mochikit/content/browser-test.js:667:9
11:31:53 INFO - Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:593:7
11:31:53 INFO - SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:750:59
11:31:53 INFO - 1240 INFO Leaving test test
11:31:53 INFO - 1241 INFO Console message: [JavaScript Error: "uncaught exception: 2147942487"]
11:31:53 INFO - 1242 INFO MEMORY STAT vsize after test: 521670656
11:31:53 INFO - 1243 INFO MEMORY STAT residentFast after test: 145129472
11:31:53 INFO - 1244 INFO MEMORY STAT heapAllocated after test: 69423372
11:31:53 INFO - 1245 INFO TEST-OK | browser/components/places/tests/browser/browser_475045.js | took 62ms 

11:31:53 INFO - 1250 INFO TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_555547.js | Uncaught exception - at chrome://mochitests/content/browser/browser/components/places/tests/browser/head.js:395 - TypeError: transitionProperties.includes is not a function
11:31:57 INFO - 1260 INFO TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js | A promise chain failed to handle a rejection: - at chrome://mochitests/content/browser/browser/components/places/tests/browser/head.js:395 - TypeError: transitionProperties.includes is not a function
11:32:42 INFO - 1271 INFO TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js | Test timed out - expected PASS
11:33:02 INFO - 1312 INFO TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_views_liveupdate.js | A promise chain failed to handle a rejection: - at chrome://mochitests/content/browser/browser/components/places/tests/browser/head.js:395 - TypeError: transitionProperties.includes is not a function
11:33:42 INFO - 1313 INFO TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_views_liveupdate.js | Test timed out - expected PASS
Flags: needinfo?(bbirtles)
Assignee: nobody → bbirtles
Status: NEW → ASSIGNED
Flags: needinfo?(bbirtles)
Array.prototype.includes() is disabled for all channels except Nightly so this
patch switches the code in head.js to use some() instead.
Attachment #8556284 - Flags: review?(mak77)
Comment on attachment 8556284 [details] [diff] [review]
Use Array.prototype.some() instead of Array.prototype.includes() in promiseSetToolbarVisibility

Review of attachment 8556284 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/components/places/tests/browser/head.js
@@ +391,5 @@
>  
>      let transitionProperties =
>        window.getComputedStyle(aToolbar).transitionProperty.split(", ");
>      if (isToolbarVisible(aToolbar) != aVisible &&
> +        transitionProperties.some(function(property) {

you could have just used .contains, that will keep working until the switch to .includes is complete. sorry for not noticing that in the review.

nit: could use an arrow function .some(prop => prop == "max-height" || prop == "all");
Attachment #8556284 - Flags: review?(mak77) → review+
oh wait, contains was the old name of includes, it just exists for strings. so confusing :)
(In reply to Marco Bonardo [::mak] (needinfo? me) from comment #2)
> nit: could use an arrow function .some(prop => prop == "max-height" || prop
> == "all");

Oh, yeah, that's much better

https://hg.mozilla.org/integration/mozilla-inbound/rev/d9dcaa887d2a
https://hg.mozilla.org/mozilla-central/rev/d9dcaa887d2a
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.