Changeset 220985 in webkit


Ignore:
Timestamp:
Aug 21, 2017 3:17:24 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Stop media/video-controls-toggling.html from timing out.
https://bugs.webkit.org/show_bug.cgi?id=116266

Patch by Ms2ger <Ms2ger@gmail.com> on 2017-08-21
Reviewed by Dean Jackson.

Use getComputedStyle to check the display property. Element::style only
contains properties set in the style attribute, but the display property
is set through CSS using the 'hidden' class.

  • media/video-controls-toggling-expected.txt:
  • media/video-controls-toggling.html:
  • platform/gtk/TestExpectations:
  • platform/gtk/media/video-controls-toggling-expected.txt: Copied from LayoutTests/media/video-controls-toggling-expected.txt. I'm not sure where the console message comes from, but it seems to be in the GTK-specific code.
Location:
trunk/LayoutTests
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r220983 r220985  
     12017-08-21  Ms2ger  <Ms2ger@gmail.com>
     2
     3        Stop media/video-controls-toggling.html from timing out.
     4        https://bugs.webkit.org/show_bug.cgi?id=116266
     5
     6        Reviewed by Dean Jackson.
     7
     8        Use getComputedStyle to check the display property. Element::style only
     9        contains properties set in the style attribute, but the display property
     10        is set through CSS using the 'hidden' class.
     11
     12        * media/video-controls-toggling-expected.txt:
     13        * media/video-controls-toggling.html:
     14        * platform/gtk/TestExpectations:
     15        * platform/gtk/media/video-controls-toggling-expected.txt:
     16          Copied from LayoutTests/media/video-controls-toggling-expected.txt.
     17          I'm not sure where the console message comes from, but it seems to
     18          be in the GTK-specific code.
     19
    1202017-08-21  Dean Jackson  <dino@apple.com>
    221
  • trunk/LayoutTests/media/video-controls-toggling-expected.txt

    r158837 r220985  
    1 Tests that showing / hiding video controls uses the sets the display:none property
     1Tests that showing / hiding video controls uses the display:none property
    22
    33
     
    99
    1010** Test that controls are shown when controls attribute is present **
    11 EXPECTED (panel.style['display'] != 'none') OK
     11EXPECTED (getComputedStyle(panel).display != 'none') OK
    1212
    1313** Move mouse outside the video **
     
    1515
    1616** The controls should have the display property set to none
    17 EXPECTED (panel.style['display'] == 'none') OK
     17EXPECTED (getComputedStyle(panel).display == 'none') OK
    1818
    1919** Remove controls attribute**
     
    2424
    2525** Video controls should not be shown **
    26 EXPECTED (panel.style['display'] == 'none') OK
     26EXPECTED (getComputedStyle(panel).display == 'none') OK
    2727
    2828END OF TEST
  • trunk/LayoutTests/media/video-controls-toggling.html

    r210959 r220985  
    4141            consoleWrite("");
    4242            consoleWrite("** Test that controls are shown when controls attribute is present **");
    43             testExpected("panel.style['display']", 'none', "!=");
     43            testExpected("getComputedStyle(panel).display", 'none', "!=");
    4444
    4545            if (window.eventSender) {
     
    5454        function continueTest()
    5555        {
    56             if (panel.style['display'] != 'none') {
     56            if (getComputedStyle(panel).display != 'none') {
    5757                setTimeout(continueTest, fadeoutTime);
    5858                return;
     
    6161            consoleWrite("");
    6262            consoleWrite("** The controls should have the display property set to none");
    63             testExpected("panel.style['display']", 'none', "==");
     63            testExpected("getComputedStyle(panel).display", 'none', "==");
    6464
    6565            consoleWrite("");
     
    7373            consoleWrite("");
    7474            consoleWrite("** Video controls should not be shown **");
    75             testExpected("panel.style['display']", 'none', "==");
     75            testExpected("getComputedStyle(panel).display", 'none', "==");
    7676
    7777            consoleWrite("");
     
    8383</head>
    8484<body onload="init()">
    85     Tests that showing / hiding video controls uses the sets the display:none property<br>
     85    Tests that showing / hiding video controls uses the display:none property<br>
    8686    <video onplay="test()" controls></video>
    8787</body>
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r220974 r220985  
    21182118webkit.org/b/130971 media/track/track-remove-track.html [ Timeout ]
    21192119
    2120 # After webkit.org/b/123097 we flag these tests that also fail in mac
    2121 webkit.org/b/123097 media/video-controls-toggling.html [ Timeout ]
    2122 
    21232120webkit.org/b/145053 http/tests/xmlhttprequest/origin-exact-matching.html [ Timeout Pass ]
    21242121
  • trunk/LayoutTests/platform/gtk/media/video-controls-toggling-expected.txt

    r220984 r220985  
    1 Tests that showing / hiding video controls uses the sets the display:none property
     1CONSOLE MESSAGE: line 122: TypeError: undefined is not an object (evaluating 'this.captionMenu.style')
     2Tests that showing / hiding video controls uses the display:none property
    23
    34
     
    910
    1011** Test that controls are shown when controls attribute is present **
    11 EXPECTED (panel.style['display'] != 'none') OK
     12EXPECTED (getComputedStyle(panel).display != 'none') OK
    1213
    1314** Move mouse outside the video **
     
    1516
    1617** The controls should have the display property set to none
    17 EXPECTED (panel.style['display'] == 'none') OK
     18EXPECTED (getComputedStyle(panel).display == 'none') OK
    1819
    1920** Remove controls attribute**
     
    2425
    2526** Video controls should not be shown **
    26 EXPECTED (panel.style['display'] == 'none') OK
     27EXPECTED (getComputedStyle(panel).display == 'none') OK
    2728
    2829END OF TEST
Note: See TracChangeset for help on using the changeset viewer.