New issue
Advanced search Search tips

Issue 761969 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Empty files succeed in loading (as WebVTT) for <track>

Project Member Reported by f...@opera.com, Sep 5 2017

Issue description

The "signature, empty" subtest of https://w3c-test.org/webvtt/parsing/file-parsing/signature-invalid.html tests loading of an empty WebVTT file, expecting failure (because of missing signature.)

 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0983d4b64cb5f519684f773daa27b2ac9b8f8688

commit 0983d4b64cb5f519684f773daa27b2ac9b8f8688
Author: Fredrik Söderquist <fs@opera.com>
Date: Wed Sep 06 10:24:56 2017

Empty files should not succeed in loading (as WebVTT)

Empty files will naturally not have a valid signature, so should fail
the signature check. When there's no data, the loader will not get any
DataReceived() callback, and hence not create a VTTParser. The
NotifyFinished() callback only checked for any error on the resource,
and would flag success if there were no resource error.
Check for the presence of a parser to detect the case where there's no
data and infer failure from it.

Also move the flush of the VTTParser first in NotifyFinished() since
it could, in rare cases, end up setting |state_| to kFailed.

Bug:  761969 
Change-Id: If6c17d50ec968625a98490e625c5f248761efe1a
Reviewed-on: https://chromium-review.googlesource.com/650291
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499925}
[delete] https://crrev.com/54ec434578c9b9352fabf98cb7a18633f42341c7/third_party/WebKit/LayoutTests/external/wpt/webvtt/parsing/file-parsing/signature-invalid-expected.txt
[delete] https://crrev.com/54ec434578c9b9352fabf98cb7a18633f42341c7/third_party/WebKit/LayoutTests/media/track/captions-webvtt/tc000-empty.vtt
[delete] https://crrev.com/54ec434578c9b9352fabf98cb7a18633f42341c7/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc000-empty.html
[modify] https://crrev.com/0983d4b64cb5f519684f773daa27b2ac9b8f8688/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp

Comment 2 by f...@opera.com, Sep 6 2017

Status: Fixed (was: Assigned)

Sign in to add a comment