File size: 940 Bytes
065fee7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"""Test playing selectors."""
from .. import util


class TestPlaying(util.TestCase):
    """Test playing selectors."""

    MARKUP = """
    <!DOCTYPE html>
    <html>
    <body>

    <video id="vid" width="320" height="240" controls>
      <source src="movie.mp4" type="video/mp4">
      <source src="movie.ogg" type="video/ogg">
      Your browser does not support the video tag.
    </video>

    </body>
    </html>
    """

    def test_playing(self):
        """Test playing (matches nothing)."""

        # Not actually sure how this is used, but it won't match anything anyways
        self.assert_selector(
            self.MARKUP,
            "video:playing",
            [],
            flags=util.HTML
        )

    def test_not_playing(self):
        """Test not playing."""

        self.assert_selector(
            self.MARKUP,
            "video:not(:playing)",
            ["vid"],
            flags=util.HTML
        )