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

Side by Side Diff: third_party/WebKit/LayoutTests/transforms/containing-block.html

Issue 2380723003: CSS: test that transform properties create containing block (Closed)
Patch Set: rebase Created 4 years, 2 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 | « no previous file | third_party/WebKit/LayoutTests/transforms/containing-block-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <div id="container" style="transform: rotate(360deg)"></div>
6
7 <script>
8 function generatesContainingBlock(property, value) {
9 var outer = document.createElement('div');
10 outer.style[property] = value;
11 container.appendChild(outer);
12
13 var inner = document.createElement('div');
14 outer.appendChild(inner);
15 return inner.offsetParent == outer;
16 }
17
18 test(function() {
19 assert_true(generatesContainingBlock('transform', 'translate(1px) scale(2) r otate(3deg)'));
20 }, "transform establishes containing block");
21 test(function() {
22 assert_true(generatesContainingBlock('will-change', 'transform'));
23 }, "will-change: transform establishes containing block");
24
25 test(function() {
26 assert_true(generatesContainingBlock('perspective', '4px'));
27 }, "perspective establishes containing block");
28 test(function() {
29 assert_true(generatesContainingBlock('will-change', 'perspective'));
30 }, "will-change: perspective establishes containing block");
31
32 test(function() {
33 assert_true(generatesContainingBlock('translate', '1px'));
34 }, "translate establishes containing block");
35 test(function() {
36 assert_true(generatesContainingBlock('will-change', 'translate'));
37 }, "will-change: translate establishes containing block");
38
39 test(function() {
40 assert_true(generatesContainingBlock('scale', '2'));
41 }, "scale establishes containing block");
42 test(function() {
43 assert_true(generatesContainingBlock('will-change', 'scale'));
44 }, "will-change: scale establishes containing block");
45
46 test(function() {
47 assert_true(generatesContainingBlock('rotate', '3deg'));
48 }, "rotate establishes containing block");
49 test(function() {
50 assert_true(generatesContainingBlock('will-change', 'rotate'));
51 }, "will-change: rotate establishes containing block");
52 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/transforms/containing-block-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698