Revision ab5780956dda798c97707e05fd2e58df7963b6d0 authored by Harald Alvestrand on 05 October 2018, 09:29:42 UTC, committed by Chromium WPT Sync on 05 October 2018, 09:29:42 UTC
This reverts commit 3f90035e2fac160d23309a96ef2cf465b29cebe4.

Reason for revert: The original problem was solved using another approach, and this CL just adds complexity with no purpose.

Original change's description:
> Implement DTMF [[ToneBuffer]] in the blink layer
>
> This CL makes the Blink layer keep a copy of the tone buffer
> and update it on insertDTMF and ontonechange events only; this
> makes it possible to expose the state of the tone buffer at the
> time the event is fired to the Javascript callback.
>
> It removes a queueing step inside the DTMF sender, because
> that queueing step destroyed the consistency.
>
> Bug: chromium:816475
> Change-Id: I5aa68396299a67d6cea1e8a17d364f553514c291
> Reviewed-on: https://chromium-review.googlesource.com/1213084
> Reviewed-by: Guido Urdaneta <guidou@chromium.org>
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Commit-Queue: Harald Alvestrand <hta@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#589910}

TBR=hta@chromium.org,haraken@chromium.org,hbos@chromium.org,guidou@chromium.org,foolip@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:816475
Change-Id: Iaee9fefa8a37e3c6c7256dacac0855f426601e0d
1 parent 006e385
Raw File
mediasource-attach-stops-delaying-load-event.html
<!DOCTYPE html>
<!-- Copyright © 2016 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). -->
<title>Tests that MediaSource attachment stops delaying the load event.</title>
<link rel="author" title="Matthew Wolenetz" href="mailto:wolenetz@chromium.org"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(function(test)
{
    var receivedLoadEvent = false;
    var receivedSourceOpenEvent = false;

    window.addEventListener("load", test.step_func(function() {
        assert_false(receivedLoadEvent, "window should not receive multiple load events");
        receivedLoadEvent = true;
        assert_equals(document.readyState, "complete", "document should be complete");
        if (receivedLoadEvent && receivedSourceOpenEvent) {
            test.done();
        }
    }));

    assert_equals(document.readyState, "loading", "document should not be complete yet");
    var video = document.createElement("video");
    var mediaSource = new MediaSource();

    // |video| should stop delaying the load event long and complete the MediaSource attachment
    // before either a "progress", "stalled" or "suspend" event are enqueued.
    video.addEventListener("suspend", test.unreached_func("unexpected 'suspend' event"));
    video.addEventListener("stalled", test.unreached_func("unexpected 'stalled' event"));
    video.addEventListener("progress", test.unreached_func("unexpected 'progress' event"));

    // No error is expected.
    video.addEventListener("error", test.unreached_func("unexpected 'error' event"));

    mediaSource.addEventListener("sourceopen", test.step_func(function() {
        assert_false(receivedSourceOpenEvent, "only one sourceopen event should occur in this test");
        receivedSourceOpenEvent = true;
        assert_equals(video.networkState, video.NETWORK_LOADING);
        assert_equals(video.readyState, video.HAVE_NOTHING);
        if (receivedLoadEvent && receivedSourceOpenEvent) {
            test.done();
        }
    }));

    var mediaSourceURL = URL.createObjectURL(mediaSource);
    video.src = mediaSourceURL;
    test.add_cleanup(function() { URL.revokeObjectURL(mediaSourceURL); });
}, "MediaSource attachment should immediately stop delaying the load event");
</script>
back to top