test_cache_restart.html is going to permafail when Gecko 41 merges to Beta

VERIFIED FIXED in Firefox 41

Status

()

Core
DOM
--
major
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: RyanVM, Assigned: Ehsan)

Tracking

Trunk
mozilla41
Points:
---

Firefox Tracking Flags

(firefox41 verified)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

3 years ago
https://treeherder.mozilla.org/logviewer.html#?job_id=8235803&repo=try

21:14:10 INFO - 1699 INFO TEST-START | dom/cache/test/mochitest/test_cache_restart.html
21:14:10 INFO - ###!!! [Parent][OnMaybeDequeueOne] Error: Channel closing: too late to send/recv, messages will be lost
21:14:11 INFO - 1700 INFO TEST-UNEXPECTED-FAIL | dom/cache/test/mochitest/test_cache_restart.html | uncaught exception - ReferenceError: caches is not defined at http://mochi.test:8888/tests/dom/cache/test/mochitest/test_cache_restart.html:35
21:14:11 INFO - JavaScript error: http://mochi.test:8888/tests/dom/cache/test/mochitest/test_cache_restart.html, line 35: ReferenceError: caches is not defined
21:14:11 INFO - MEMORY STAT vsize after test: 21991997509632
21:14:11 INFO - MEMORY STAT residentFast after test: 1092706304
21:14:11 INFO - 1701 INFO TEST-OK | dom/cache/test/mochitest/test_cache_restart.html | took 286ms
21:14:11 INFO - 1702 INFO TEST-START | dom/cache/test/mochitest/test_cache_shrink.html
21:14:14 INFO - JavaScript error: http://mochi.test:8888/tests/dom/cache/test/mochitest/test_cache_shrink.html, line 80: ReferenceError: caches is not defined
21:19:16 INFO - Xlib: extension "RANDR" missing on display ":0".
21:19:16 INFO - TEST-INFO | screentopng: exit 0
21:19:16 INFO - 1703 INFO TEST-PASS | dom/cache/test/mochitest/test_cache_shrink.html | disk usage should be zero to start
21:19:16 INFO - 1704 INFO TEST-UNEXPECTED-FAIL | dom/cache/test/mochitest/test_cache_shrink.html | Test timed out. - expected PASS
21:19:16 INFO - MEMORY STAT vsize after test: 21991876059136
21:19:16 INFO - MEMORY STAT residentFast after test: 1108299776
21:19:16 INFO - 1705 INFO TEST-OK | dom/cache/test/mochitest/test_cache_shrink.html | took 305766ms
Flags: needinfo?(bkelly)

Updated

3 years ago
Assignee: nobody → bkelly
Flags: needinfo?(bkelly)

Comment 1

3 years ago
Ugh.  The test sets the right pref, but its too late to unhide the .caches getter on the window global.  The window global is already setup by the time the script runs.  I think we have to use an iframe for this test and test_cache_shrink.html.

Ehsan, is there any other easier way?
Flags: needinfo?(ehsan)

Comment 2

3 years ago
Actually, can we just disable these tests for beta and release?  I'm hoping to remove this pref completely in the few weeks, so I don't really feel like re-writing these tests just to set it properly.

Comment 3

3 years ago
Created attachment 8617005 [details] [diff] [review]
Skip Cache restart and shrink tests if dom.caches.enabled is not set.  r=ehsan

This skips the test if the pref is disabled.  Like I said above, I think this makes more sense since the pref will be removed in the near future.
Flags: needinfo?(ehsan)
Attachment #8617005 - Flags: review?(ehsan)

Comment 4

3 years ago
Comment on attachment 8617005 [details] [diff] [review]
Skip Cache restart and shrink tests if dom.caches.enabled is not set.  r=ehsan

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

Note.  There are no changes in the big test blocks.  I just had to do an indentation change since I can't return from the outer most level of a script tag.
(Assignee)

Comment 5

3 years ago
Fixing this "properly" isn't actually very difficult, all you really need is to access the caches property from a global created after setting the pref.  A very simple trick for doing that is using an empty iframe.  I have a patch that does this alternative.  How about this?
(Assignee)

Comment 6

3 years ago
Created attachment 8617334 [details] [diff] [review]
Use the caches global property from an iframe loaded after setting the pref in order to make the tests pass with the pref disabled
Attachment #8617334 - Flags: review?(bkelly)

Comment 7

3 years ago
Comment on attachment 8617334 [details] [diff] [review]
Use the caches global property from an iframe loaded after setting the pref in order to make the tests pass with the pref disabled

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

Thanks!  That probably would have taken me a few hours to figure out.
Attachment #8617334 - Flags: review?(bkelly) → review+

Updated

3 years ago
Attachment #8617005 - Attachment is obsolete: true
Attachment #8617005 - Flags: review?(ehsan)
(Assignee)

Comment 8

3 years ago
np :)
(Assignee)

Comment 10

3 years ago
Ryan, do you mind backporting this to Aurora please?  Thanks!
Flags: needinfo?(ryanvm)

Comment 11

3 years ago
Ehsan fixed this. :-)
Assignee: bkelly → ehsan
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/72c67850a705
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox41: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
(Reporter)

Comment 13

3 years ago
Unless I'm missing something here, these tests were added by bug 1165395, which landed for Gecko 41.
Flags: needinfo?(ryanvm)
(Assignee)

Comment 14

3 years ago
Yes, you're right!
(Reporter)

Updated

3 years ago
Status: RESOLVED → VERIFIED
status-firefox41: fixed → verified
You need to log in before you can comment on or make changes to this bug.