| Differences between
and this patch
- LayoutTests/ChangeLog +12 lines
Lines 1-3 LayoutTests/ChangeLog_sec1
1
2017-03-29  Per Arne Vollan  <pvollan@apple.com>
2
3
        REGRESSION(~r212322): LayoutTest media/track/track-cue-container-rendering-position.html is a flaky timeout
4
        https://bugs.webkit.org/show_bug.cgi?id=168660
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        The textTrackDisplayElement call will fail and throw an exception if the text track display element
9
        has not yet been added to the text track container element. We wait until it has been added.
10
11
        * media/track/track-cue-container-rendering-position.html:
12
1
2017-03-29  Antoine Quint  <graouts@apple.com>
13
2017-03-29  Antoine Quint  <graouts@apple.com>
2
14
3
        [mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout
15
        [mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout
- LayoutTests/media/track/track-cue-container-rendering-position.html -3 / +19 lines
Lines 10-16 LayoutTests/media/track/track-cue-container-rendering-position.html_sec1
10
        <script>
10
        <script>
11
11
12
        var cueDisplayElement;
12
        var cueDisplayElement;
13
13
        var retries = 0;
14
        var maxRetries = 256;
15
        
14
        function testPosition()
16
        function testPosition()
15
        {
17
        {
16
            if (!window.internals) {
18
            if (!window.internals) {
Lines 18-25 LayoutTests/media/track/track-cue-container-rendering-position.html_sec2
18
                return;
20
                return;
19
            }
21
            }
20
22
23
            // The textTrackDisplayElement call will fail and throw an exception if the text track display element
24
            // has not yet been added to the text track container element. We wait until it has been added.
25
            try {
26
                cueDisplayElement = textTrackDisplayElement(video, 'display', 0);
27
            } catch (exception) {
28
                retries++;
29
                if (retries > maxRetries) {
30
                    consoleWrite("The test failed because the text track display element was not found.");
31
                    endTest();
32
                }
33
                else
34
                    setTimeout(testPosition, 100);
35
                return;
36
            }
37
21
            consoleWrite("");
38
            consoleWrite("");
22
            cueDisplayElement = textTrackDisplayElement(video, 'display', 0);
23
            document.body.offsetTop;
39
            document.body.offsetTop;
24
            testExpected("cueDisplayElement.offsetTop > (video.videoHeight * .70)", true);
40
            testExpected("cueDisplayElement.offsetTop > (video.videoHeight * .70)", true);
25
            endTest();
41
            endTest();
Lines 31-37 LayoutTests/media/track/track-cue-container-rendering-position.html_sec3
31
47
32
            findMediaElement();
48
            findMediaElement();
33
            video.src = findMediaFile('video', '../content/test');
49
            video.src = findMediaFile('video', '../content/test');
34
            waitForEvent('canplaythrough', function () {setTimeout(testPosition, 100);});
50
            waitForEvent('canplaythrough', testPosition);
35
        }
51
        }
36
52
37
        setCaptionDisplayMode('Automatic');
53
        setCaptionDisplayMode('Automatic');

Return to Bug 168660