Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutMediaTest.cpp

Issue 2702473002: Don't allow out-of-flow positioned and floating children under LayoutMedia (Closed)
Patch Set: Fix a typo Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMedia.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "core/layout/LayoutVideo.h"
6
7 #include "core/layout/LayoutTestHelper.h"
8
9 namespace blink {
10
11 using LayoutMediaTest = RenderingTest;
12
13 TEST_F(LayoutMediaTest, DisallowInlineChild) {
14 setBodyInnerHTML(
15 "<style>"
16 " ::-webkit-media-controls { display: inline; }"
17 "</style>"
18 "<video id='video'></video>");
19
20 EXPECT_FALSE(getLayoutObjectByElementId("video")->slowFirstChild());
21 }
22
23 TEST_F(LayoutMediaTest, DisallowBlockChild) {
24 setBodyInnerHTML(
25 "<style>"
26 " ::-webkit-media-controls { display: block; }"
27 "</style>"
28 "<video id='video'></video>");
29
30 EXPECT_FALSE(getLayoutObjectByElementId("video")->slowFirstChild());
31 }
32
33 TEST_F(LayoutMediaTest, DisallowOutOfFlowPositionedChild) {
34 setBodyInnerHTML(
35 "<style>"
36 " ::-webkit-media-controls { position: absolute; }"
37 "</style>"
38 "<video id='video'></video>");
39
40 EXPECT_FALSE(getLayoutObjectByElementId("video")->slowFirstChild());
41 }
42
43 TEST_F(LayoutMediaTest, DisallowFloatingChild) {
44 setBodyInnerHTML(
45 "<style>"
46 " ::-webkit-media-controls { float: left; }"
47 "</style>"
48 "<video id='video'></video>");
49
50 EXPECT_FALSE(getLayoutObjectByElementId("video")->slowFirstChild());
51 }
52
53 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMedia.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698