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

Issue 1858073002: Media: Report HTMLMediaElement player errors to devtools console

Created:
4 years, 8 months ago by wolenetz
Modified:
3 years, 5 months ago
Reviewers:
philipj_slow
CC:
chromium-reviews, nessy, mlamouri+watch-blink_chromium.org, blink-reviews-html_chromium.org, gasubic, fs, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, blink-reviews, vcarbune.chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@fix_472253_1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Media: Report HTMLMediaElement player errors to devtools console Upon transition into non-null |m_error| state, also logs any known player error to the devtools console. Includes updated layout test expectations including the new logs. Bugs 600810 and 600849 discovered while updating layout test expectations. Bug 601086 tracks improving the quality of some of the new messages. BUG=472253, 600810, 600849, 601086

Patch Set 1 #

Patch Set 2 : Rebase to ToT and Update layout test expectations to include the new console logs #

Total comments: 2

Patch Set 3 : rebase #

Patch Set 4 : Fixes comment typo #

Total comments: 3

Patch Set 5 : Rebase, attempt to fix 1 regressed expectation, temporary logging for investigating 2 other regress… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -8 lines) Patch
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/video/video-controls-layer-creation-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/undo/audio-in-undo-stack-crash-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/open-window-features-fuzz-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/media-element-focus-tab-expected.txt View 1 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/form-associated-element-crash3-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/js/custom-constructors-expected.txt View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-media-elements.html View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/appcache/video-expected.txt View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html View 1 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-gc-after-decode-error-crash-expected.txt View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/media/pdf-served-as-pdf-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/media/text-served-as-text-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/media/video-load-metadata-decode-error-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/video-poster-cross-origin-crash2-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/media-elements/location-of-the-media-resource/currentSrc-expected.txt View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/the-audio-element/audio_constructor-expected.txt View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/W3C/audio/src/src_reflects_attribute_not_source_elements-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/W3C/video/src/src_reflects_attribute_not_source_elements-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/audio-no-installed-engines-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/broken-video-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/event-attributes-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/media-controls-invalid-url-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/media-reparent.html View 1 2 3 1 chunk +9 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/media-reparent-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/remove-from-document-before-load-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/unsupported-rtsp-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/unsupported-tracks-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/video-error-does-not-exist-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/video-load-networkState-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/video-play-pause-events-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/video-size-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/video-src-change-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/video-src-invalid-remove-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/video-src-plus-source-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/permissionclient/audio-permissions-expected.txt View 1 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/permissionclient/video-permissions-expected.txt View 1 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 3 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (12 generated)
wolenetz
Please take a look. Getting at least some exposure to devtools console of reason for ...
4 years, 8 months ago (2016-04-04 23:08:08 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1858073002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1858073002/1
4 years, 8 months ago (2016-04-05 00:25:09 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/206815)
4 years, 8 months ago (2016-04-05 01:53:10 UTC) #6
philipj_slow
lgtm
4 years, 8 months ago (2016-04-05 11:19:48 UTC) #7
wolenetz
Thanks for review, Philip. pfeldman@, friendly ping :) Please also see my previous questions. Note ...
4 years, 8 months ago (2016-04-05 18:24:55 UTC) #8
wolenetz
Patch set 2 should go better on the bots. philipj@, please review the layout expectation ...
4 years, 8 months ago (2016-04-05 23:17:07 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1858073002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1858073002/20001
4 years, 8 months ago (2016-04-05 23:17:44 UTC) #13
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_blink_oilpan_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_blink_oilpan_rel/builds/26974)
4 years, 8 months ago (2016-04-06 00:33:05 UTC) #15
philipj_slow
LGTM, but better understanding the details of https://bugs.chromium.org/p/chromium/issues/detail?id=600849 would be nice. https://codereview.chromium.org/1858073002/diff/20001/third_party/WebKit/LayoutTests/media/media-reparent.html File third_party/WebKit/LayoutTests/media/media-reparent.html (right): ...
4 years, 8 months ago (2016-04-06 09:05:38 UTC) #16
philipj_slow
Also, some of the messages are very cryptic. Any change of making them consistently formatted ...
4 years, 8 months ago (2016-04-06 09:13:29 UTC) #17
wolenetz
On 2016/04/06 09:13:29, philipj wrote: > Also, some of the messages are very cryptic. Any ...
4 years, 8 months ago (2016-04-06 17:25:08 UTC) #18
wolenetz
There's still some discrepancy on the bots vs my local build for 2 or 3 ...
4 years, 8 months ago (2016-04-06 20:16:04 UTC) #21
pfeldman
https://codereview.chromium.org/1858073002/diff/60001/third_party/WebKit/LayoutTests/compositing/video/video-controls-layer-creation-expected.txt File third_party/WebKit/LayoutTests/compositing/video/video-controls-layer-creation-expected.txt (right): https://codereview.chromium.org/1858073002/diff/60001/third_party/WebKit/LayoutTests/compositing/video/video-controls-layer-creation-expected.txt#newcode1 third_party/WebKit/LayoutTests/compositing/video/video-controls-layer-creation-expected.txt:1: CONSOLE ERROR: MEDIA_ERROR_LOG_ENTRY {"error":"Failed loading buffered resource. Error code=-6"} ...
4 years, 8 months ago (2016-04-06 21:45:41 UTC) #22
pfeldman
https://codereview.chromium.org/1858073002/diff/60001/third_party/WebKit/Source/core/html/HTMLMediaElement.h File third_party/WebKit/Source/core/html/HTMLMediaElement.h (right): https://codereview.chromium.org/1858073002/diff/60001/third_party/WebKit/Source/core/html/HTMLMediaElement.h#newcode378 third_party/WebKit/Source/core/html/HTMLMediaElement.h:378: void reportPlayerErrorToDevToolsConsole(); "ToDevToolsConsole" can be trimmed - what it ...
4 years, 8 months ago (2016-04-06 21:49:54 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1858073002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1858073002/80001
4 years, 8 months ago (2016-04-08 20:31:44 UTC) #25
wolenetz
On 2016/04/06 20:16:04, wolenetz wrote: > There's still some discrepancy on the bots vs my ...
4 years, 8 months ago (2016-04-08 20:38:22 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/202246)
4 years, 8 months ago (2016-04-08 21:52:37 UTC) #28
philipj_slow
On 2016/04/08 20:38:22, wolenetz wrote: > On 2016/04/06 20:16:04, wolenetz wrote: > > There's still ...
4 years, 8 months ago (2016-04-11 09:43:52 UTC) #29
wolenetz1
3 years, 5 months ago (2017-07-07 23:15:26 UTC) #31
On 2016/04/11 09:43:52, philipj_slow wrote:
> On 2016/04/08 20:38:22, wolenetz wrote:
> > On 2016/04/06 20:16:04, wolenetz wrote:
> > > There's still some discrepancy on the bots vs my local build for 2 or 3 of
> the
> > > layout tests. I'll be using some temporary extra logging in upcoming patch
> > sets
> > > to see what the bots are actually logging versus what my local build logs.
> > > 
> > > I've also noted some follow-up work to help reduce this fragility later at
> > > https://bugs.chromium.org/p/chromium/issues/detail?id=599620#c1
> > > 
> > >
> >
>
https://codereview.chromium.org/1858073002/diff/20001/third_party/WebKit/Layo...
> > > File third_party/WebKit/LayoutTests/media/media-reparent.html (right):
> > > 
> > >
> >
>
https://codereview.chromium.org/1858073002/diff/20001/third_party/WebKit/Layo...
> > > third_party/WebKit/LayoutTests/media/media-reparent.html:20: // flakily
> > missing
> > > console error log. If flakes recur, we may needxi
> > > On 2016/04/06 09:05:37, philipj wrote:
> > > > s/needxi/need/
> > > 
> > > Done :)
> > 
> > Hmm. I'd already begun thinking that some of these layout test failures are
> > spurious flakes due to timing. fast/js/custom-constructors.html is one
that's
> > showing such flakiness.
> > (Timing isn't the only variable that can cause flakiness, but it looks like
> it's
> > one that's impacting this CL already.)
> > A  solution that I might need to land as part of this is to update
> > testRunner/etc to support conditional inclusion of these new log messages.
> > Alternatively, I'd need to adjust the timing in various tests and test
> > maintainers will have extra overhead of making sure they include the
> appropriate
> > log messages and avoid timing flakes.
> > philipj@: WDYT about these two options?
> 
> I would lean towards making the tests reliable if at all possible. If there
are
> errors triggered close to the end of the test, then waiting for the error
event
> ought to make it reliable. Do you think that covers most of the problem, or do
> you know of cases where the error isn't triggered reliably at all, so that
> prolonging the test doesn't help?

I'm not sure of the value of this CL approach now that I've instead standardized
MediaError.message and landed it's implementation in Chrome. The point of the
console logging was to get the error message to developers who are debugging.
MediaError.message should now contain this info (though it's not automatically
logged to the console).

I'm considering abandoning the console logging approach unless y'all see some
value in it beyond MediaError.message.

Powered by Google App Engine
This is Rietveld 408576698