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

Issue 2401013002: Make MediaSession per frame as an attribute of Navigator (Closed)

Created:
4 years, 2 months ago by Zhiqiang Zhang (Slow)
Modified:
4 years, 2 months ago
CC:
blink-reviews, chromium-reviews, darin-cc_chromium.org, eric.carlson_apple.com, feature-media-reviews_chromium.org, haraken, jam, mlamouri+watch-blink_chromium.org, Srirama
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make MediaSession per frame as an attribute of Navigator This CL makes MediaSession non user-constructible, and make it as an attribute of window.navigator, thus MediaSession is one object per frame. This CL also adds back the removed browser tests as layout tests using a mock blink::mojom::MediaSessionService in js. This CL also made MediaSession enabled in tests so no need for virtual tests anymore. Spec URL: https://wicg.github.io/mediasession/ BUG=643190, 646490, 653894 Committed: https://crrev.com/dbbe70b8977af46a3c33d2b1c42123f7e5d5b98b Cr-Commit-Position: refs/heads/master@{#424702}

Patch Set 1 #

Patch Set 2 : layout tests #

Patch Set 3 : fixed tests #

Total comments: 50

Patch Set 4 : addressed comments #

Patch Set 5 : minor fixes #

Patch Set 6 : fixed build #

Patch Set 7 : split mojo tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -80 lines) Patch
M third_party/WebKit/LayoutTests/VirtualTestSuites View 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-navigated-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
D third_party/WebKit/LayoutTests/media/mediasession/mediaimage-expected.txt View 1 chunk +0 lines, -8 lines 0 comments Download
D third_party/WebKit/LayoutTests/media/mediasession/mediasession-constructor.html View 1 chunk +0 lines, -14 lines 0 comments Download
D third_party/WebKit/LayoutTests/media/mediasession/mediasession-constructor-expected.txt View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/mediasession/mediasessionmetadata.html View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
D third_party/WebKit/LayoutTests/media/mediasession/mediasessionmetadata-expected.txt View 1 chunk +0 lines, -8 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/mediasession/mojo/file-image-removed.html View 1 2 3 4 5 6 1 chunk +26 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/mediasession/mojo/metadata-propagated.html View 1 2 3 4 5 6 1 chunk +28 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/mediasession/mojo/metadata-propagated-twice.html View 1 2 3 4 5 6 1 chunk +33 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js View 1 2 3 4 5 6 1 chunk +72 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/utils.js View 1 2 3 4 5 6 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/mediasession/mojo/set-null-metadata.html View 1 2 3 4 5 6 1 chunk +20 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/media/mediasession/navigator-mediasession.html View 1 chunk +5 lines, -5 lines 0 comments Download
D third_party/WebKit/LayoutTests/virtual/mediasession/media/mediasession/README.txt View 1 chunk +0 lines, -3 lines 0 comments Download
D third_party/WebKit/LayoutTests/virtual/mediasession/media/mediasession/mediaimage-expected.txt View 1 chunk +0 lines, -8 lines 0 comments Download
D third_party/WebKit/LayoutTests/virtual/mediasession/media/mediasession/mediasession-constructor-expected.txt View 1 chunk +0 lines, -5 lines 0 comments Download
D third_party/WebKit/LayoutTests/virtual/mediasession/media/mediasession/mediasessionmetadata-expected.txt View 1 chunk +0 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 4 chunks +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaSession.idl View 1 chunk +0 lines, -1 line 0 comments Download
A third_party/WebKit/Source/modules/mediasession/NavigatorMediaSession.h View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/mediasession/NavigatorMediaSession.cpp View 1 2 3 4 5 1 chunk +41 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/modules/mediasession/NavigatorMediaSession.idl View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/modules_idl_files.gni View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 52 (37 generated)
Zhiqiang Zhang (Slow)
Please review this CL :) Thanks to the IPC->mojo CL, we only need several small ...
4 years, 2 months ago (2016-10-10 13:41:02 UTC) #8
Zhiqiang Zhang (Slow)
+foolip for RuntimeEnabledFeatures.in change. Is it OK to enable "MediaSession status=test"? I'm doing this since ...
4 years, 2 months ago (2016-10-10 18:44:44 UTC) #13
foolip
RuntimeEnabledFeatures.in lgtm, virtual tests seemed like a good idea but maybe not :)
4 years, 2 months ago (2016-10-10 19:02:27 UTC) #14
mlamouri (slow - plz ping)
Didn't finish to review the tests but I have to run. https://codereview.chromium.org/2401013002/diff/60001/third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html File third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html (right): ...
4 years, 2 months ago (2016-10-10 20:30:35 UTC) #18
whywhat
overall lgtm but please find a more consistent way for the integration test :) https://codereview.chromium.org/2401013002/diff/60001/third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html ...
4 years, 2 months ago (2016-10-10 20:45:10 UTC) #19
Zhiqiang Zhang (Slow)
Some quick replies to avayvod@, haven't done any changes yet. https://codereview.chromium.org/2401013002/diff/60001/third_party/WebKit/LayoutTests/media/mediasession/mediasession-constructor-hidden.html File third_party/WebKit/LayoutTests/media/mediasession/mediasession-constructor-hidden.html (right): https://codereview.chromium.org/2401013002/diff/60001/third_party/WebKit/LayoutTests/media/mediasession/mediasession-constructor-hidden.html#newcode2 ...
4 years, 2 months ago (2016-10-10 21:21:19 UTC) #22
Zhiqiang Zhang (Slow)
PTAL for mlamouri@ (since I see you didn't looked at the tests thoroughly and maybe ...
4 years, 2 months ago (2016-10-11 10:56:04 UTC) #25
whywhat
https://codereview.chromium.org/2401013002/diff/60001/third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html File third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html (right): https://codereview.chromium.org/2401013002/diff/60001/third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html#newcode7 third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html:7: test(function() { On 2016/10/11 at 10:56:03, Zhiqiang Zhang wrote: ...
4 years, 2 months ago (2016-10-11 14:58:33 UTC) #28
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2401013002/diff/60001/third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html File third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html (right): https://codereview.chromium.org/2401013002/diff/60001/third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html#newcode7 third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html:7: test(function() { On 2016/10/11 at 14:58:33, whywhat wrote: > ...
4 years, 2 months ago (2016-10-11 16:59:05 UTC) #32
whywhat
https://codereview.chromium.org/2401013002/diff/60001/third_party/WebKit/LayoutTests/media/mediasession/mediasession-integration-test.html File third_party/WebKit/LayoutTests/media/mediasession/mediasession-integration-test.html (right): https://codereview.chromium.org/2401013002/diff/60001/third_party/WebKit/LayoutTests/media/mediasession/mediasession-integration-test.html#newcode28 third_party/WebKit/LayoutTests/media/mediasession/mediasession-integration-test.html:28: return mediaSessionServiceMock.then(m => { On 2016/10/11 at 16:59:05, Zhiqiang ...
4 years, 2 months ago (2016-10-11 18:59:45 UTC) #39
Zhiqiang Zhang (Slow)
Addressed Anton's comments. https://codereview.chromium.org/2401013002/diff/60001/third_party/WebKit/LayoutTests/media/mediasession/mediasession-integration-test.html File third_party/WebKit/LayoutTests/media/mediasession/mediasession-integration-test.html (right): https://codereview.chromium.org/2401013002/diff/60001/third_party/WebKit/LayoutTests/media/mediasession/mediasession-integration-test.html#newcode28 third_party/WebKit/LayoutTests/media/mediasession/mediasession-integration-test.html:28: return mediaSessionServiceMock.then(m => { On 2016/10/11 ...
4 years, 2 months ago (2016-10-11 19:39:05 UTC) #42
Zhiqiang Zhang (Slow)
I'm land the patch now since all the comments are addressed. Anton mentioned [Exposed=Window] but ...
4 years, 2 months ago (2016-10-12 09:39:54 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2401013002/160001
4 years, 2 months ago (2016-10-12 09:40:14 UTC) #48
commit-bot: I haz the power
Committed patchset #7 (id:160001)
4 years, 2 months ago (2016-10-12 09:58:58 UTC) #50
commit-bot: I haz the power
4 years, 2 months ago (2016-10-12 10:01:06 UTC) #52
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/dbbe70b8977af46a3c33d2b1c42123f7e5d5b98b
Cr-Commit-Position: refs/heads/master@{#424702}

Powered by Google App Engine
This is Rietveld 408576698