Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part_test.cc |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part_test.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..98bf304e0b02d0212c07a9bc6f8aa05afafaa8d1 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part_test.cc |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
|
ikilpatrick
2017/01/31 01:12:15
2017
atotic
2017/01/31 01:15:41
done
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "core/layout/ng/ng_out_of_flow_layout_part.h" |
| + |
| +#include "core/layout/LayoutTestHelper.h" |
| +#include "core/dom/Element.h" |
| + |
| +namespace blink { |
| +namespace { |
| + |
| +class NGOutOfFlowLayoutPartTest : public RenderingTest { |
| + public: |
| + NGOutOfFlowLayoutPartTest(){}; |
|
ikilpatrick
2017/01/31 01:12:15
you'll need to flip on the experimental flag to hi
atotic
2017/01/31 01:15:41
huh? Please clarify.
Gleb Lanbin
2017/01/31 19:19:35
you need something like
NGOutOfFlowLayoutPartTest(
atotic
2017/02/01 01:37:19
done
|
| +}; |
| + |
| +TEST_F(NGOutOfFlowLayoutPartTest, FixedInsideAbs) { |
|
Gleb Lanbin
2017/01/31 19:19:35
please add a short comment that describes what use
atotic
2017/02/01 01:37:19
done.
|
| + setBodyInnerHTML( |
| + "<style>body{padding:0px;margin:0px}</style>" |
| + "<div id='rel' style='position:relative;'>" |
| + "<div style='position:absolute;top:49px;left:0px;'>" |
| + "<div style='width:100px;height:50px;background-color:yellow;'></div>" |
| + "<div " |
| + "id='fixed1'" |
|
Gleb Lanbin
2017/01/31 19:19:35
you can fit this at the previous line and below (f
atotic
2017/02/01 01:37:19
done
|
| + "style='position:fixed;background-color:gray;width:50px'>" |
| + "<p>fixed static</p>" |
| + "</div>" |
| + "<div " |
| + "id='fixed2'" |
| + "style='position:fixed;background-color:gray;top:9px;left:7px;'>" |
| + "<p>fixed plain</p>" |
| + "</div>" |
| + "</div>" |
| + "</div>"); |
| + Element* fixed1 = document().getElementById("fixed1"); |
| + Element* fixed2 = document().getElementById("fixed2"); |
|
ikilpatrick
2017/01/31 01:14:12
also might be good just to check there are N fragm
atotic
2017/01/31 01:22:34
There are no APIs to get fragment tree from Elemen
Gleb Lanbin
2017/01/31 19:19:35
per discussion with Emil/Christian a Rendering tes
atotic
2017/02/01 01:37:19
Fixed elements are currently directly positioned b
|
| + EXPECT_EQ(fixed1->offsetTop(), LayoutUnit(99)); |
|
Gleb Lanbin
2017/01/31 19:19:35
please add a short comment that describes how we e
atotic
2017/02/01 01:37:19
done
|
| + EXPECT_EQ(fixed2->offsetTop(), LayoutUnit(9)); |
| +}; |
| +} |
|
Gleb Lanbin
2017/01/31 19:19:35
} // namespace
} // namespace blink
|
| +} |