Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Issue 209103002: Add lifetime tests for MediaKeySession (Closed)

Created:
6 years, 9 months ago by jrummell
Modified:
6 years, 9 months ago
Reviewers:
xhwang, ddorwin
CC:
blink-reviews, feature-media-reviews_chromium.org, philipj_slow, eric.carlson_apple.com
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Add lifetime tests for MediaKeySession Since MediaKeySessions are ActiveDOMObjects and can be counted, adding tests to verify that garbage collection frees the sessions when they are no longer needed. One test simply uses JS references to keep the sessions around, while the other calls release() on the session to free them. BUG=341567 TEST=new tests pass Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170341

Patch Set 1 #

Total comments: 25

Patch Set 2 : Simplified one test #

Total comments: 19

Patch Set 3 : remove onMessage() #

Total comments: 5

Patch Set 4 : rearrange #

Total comments: 11

Patch Set 5 : Add test #

Total comments: 6

Patch Set 6 : Add asserts #

Total comments: 2

Patch Set 7 : Move gc() #

Messages

Total messages: 21 (0 generated)
jrummell
Some more EME tests. PTAL.
6 years, 9 months ago (2014-03-21 22:08:53 UTC) #1
xhwang
https://codereview.chromium.org/209103002/diff/1/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference-expected.txt File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference-expected.txt (right): https://codereview.chromium.org/209103002/diff/1/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference-expected.txt#newcode1 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference-expected.txt:1: This is a testharness.js-based test. FYI, I need to ...
6 years, 9 months ago (2014-03-26 20:58:32 UTC) #2
jrummell
Updated. https://codereview.chromium.org/209103002/diff/1/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference-expected.txt File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference-expected.txt (right): https://codereview.chromium.org/209103002/diff/1/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference-expected.txt#newcode1 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference-expected.txt:1: This is a testharness.js-based test. On 2014/03/26 20:58:32, ...
6 years, 9 months ago (2014-03-26 22:19:03 UTC) #3
xhwang
Thanks, more comments/nits. https://codereview.chromium.org/209103002/diff/1/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference-expected.txt File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference-expected.txt (right): https://codereview.chromium.org/209103002/diff/1/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference-expected.txt#newcode1 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference-expected.txt:1: This is a testharness.js-based test. On ...
6 years, 9 months ago (2014-03-26 22:59:09 UTC) #4
jrummell
Updated. https://codereview.chromium.org/209103002/diff/20001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference.html File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference.html (right): https://codereview.chromium.org/209103002/diff/20001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference.html#newcode19 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference.html:19: // OR (MediaKeys is around AND the session ...
6 years, 9 months ago (2014-03-26 23:32:08 UTC) #5
xhwang
LG, just a couple of more comments. https://codereview.chromium.org/209103002/diff/40001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html (right): https://codereview.chromium.org/209103002/diff/40001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html#newcode41 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html:41: // event.target ...
6 years, 9 months ago (2014-03-27 00:46:39 UTC) #6
jrummell
Updated. https://codereview.chromium.org/209103002/diff/40001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html (right): https://codereview.chromium.org/209103002/diff/40001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html#newcode41 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html:41: // event.target is a reference to the MediaKeySession. ...
6 years, 9 months ago (2014-03-27 01:22:23 UTC) #7
xhwang
Thanks! lgtm % nit https://codereview.chromium.org/209103002/diff/40001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html (right): https://codereview.chromium.org/209103002/diff/40001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html#newcode41 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html:41: // event.target is a reference ...
6 years, 9 months ago (2014-03-27 17:06:59 UTC) #8
ddorwin
https://codereview.chromium.org/209103002/diff/30005/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference.html File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference.html (right): https://codereview.chromium.org/209103002/diff/30005/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference.html#newcode1 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference.html:1: <!DOCTYPE html> Once the Decryptor lifetimes are fixed, we'll ...
6 years, 9 months ago (2014-03-27 17:20:36 UTC) #9
jrummell
Updated with new test. https://codereview.chromium.org/209103002/diff/30005/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference.html File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference.html (right): https://codereview.chromium.org/209103002/diff/30005/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference.html#newcode13 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-reference.html:13: setup({ timeout: 60000 }); // ...
6 years, 9 months ago (2014-03-27 18:42:55 UTC) #10
ddorwin
https://codereview.chromium.org/209103002/diff/70001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html (right): https://codereview.chromium.org/209103002/diff/70001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html#newcode48 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html:48: --openSessions; assert that mediaKeySession1 and mediaKeySession2 are both null. ...
6 years, 9 months ago (2014-03-27 18:56:51 UTC) #11
jrummell
Updated. https://codereview.chromium.org/209103002/diff/70001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html (right): https://codereview.chromium.org/209103002/diff/70001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html#newcode48 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html:48: --openSessions; On 2014/03/27 18:56:51, ddorwin wrote: > assert ...
6 years, 9 months ago (2014-03-27 20:12:54 UTC) #12
ddorwin
LGTM % one comment. https://codereview.chromium.org/209103002/diff/90001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html (right): https://codereview.chromium.org/209103002/diff/90001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html#newcode64 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html:64: assert_equals(openSessions, 0); Shouldn't this come ...
6 years, 9 months ago (2014-03-27 20:14:48 UTC) #13
jrummell
Thanks for the reviews. https://codereview.chromium.org/209103002/diff/90001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html File LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html (right): https://codereview.chromium.org/209103002/diff/90001/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html#newcode64 LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noref.html:64: assert_equals(openSessions, 0); On 2014/03/27 20:14:49, ...
6 years, 9 months ago (2014-03-27 20:45:15 UTC) #14
jrummell
The CQ bit was checked by jrummell@chromium.org
6 years, 9 months ago (2014-03-27 20:45:22 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jrummell@chromium.org/209103002/110001
6 years, 9 months ago (2014-03-27 20:45:28 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-27 22:32:57 UTC) #17
commit-bot: I haz the power
Commit queue rejected this change because the description was changed between the time the change ...
6 years, 9 months ago (2014-03-27 22:32:58 UTC) #18
jrummell
The CQ bit was checked by jrummell@chromium.org
6 years, 9 months ago (2014-03-28 16:11:32 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jrummell@chromium.org/209103002/110001
6 years, 9 months ago (2014-03-28 16:11:38 UTC) #20
commit-bot: I haz the power
6 years, 9 months ago (2014-03-28 17:14:58 UTC) #21
Message was sent while issue was closed.
Change committed as 170341

Powered by Google App Engine
This is Rietveld 408576698