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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerTest.cpp

Issue 1685073002: Revert of Reland Fix leak PaintLayerReflectionInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/paint/PaintLayerReflectionInfo.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 2016 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/paint/PaintLayer.h"
6
7 #include "core/layout/LayoutReplica.h"
8 #include "core/layout/LayoutTestHelper.h"
9
10 namespace blink {
11
12 class PaintLayerTest : public RenderingTest {
13 };
14
15 TEST_F(PaintLayerTest, ReflectionLeak)
16 {
17 setBodyInnerHTML("<div id='div' style='-webkit-box-reflect: above'>test</div >");
18 HTMLElement* div = toHTMLElement(document().getElementById(AtomicString("div ")));
19 PaintLayerReflectionInfo* reflectionInfo = div->layoutBoxModelObject()->laye r()->reflectionInfo();
20 ASSERT_TRUE(reflectionInfo);
21 LayoutReplica* replica = reflectionInfo->reflection();
22 ASSERT_TRUE(replica);
23
24 div->setAttribute(HTMLNames::styleAttr, "-webkit-box-reflect: below");
25 document().view()->updateAllLifecyclePhases();
26
27 PaintLayerReflectionInfo* newReflectionInfo = div->layoutBoxModelObject()->l ayer()->reflectionInfo();
28 ASSERT_TRUE(newReflectionInfo);
29 EXPECT_NE(reflectionInfo, newReflectionInfo);
30 LayoutReplica* newReplica = newReflectionInfo->reflection();
31 ASSERT_TRUE(newReplica);
32 EXPECT_NE(replica, newReplica);
33
34 // LeakDetector should report no leaks of LayoutReplica or PaintLayer.
35 }
36
37 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerReflectionInfo.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698