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

Side by Side Diff: third_party/WebKit/Source/core/dom/ElementRareDataTest.cpp

Issue 2001453002: Set ComputedStyle on Node and use that in buildOwnLayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@storage
Patch Set: Remove any cases that are forcing the newStyle on the old LayoutObject 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
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/dom/ElementRareData.h"
6
7 #include "core/layout/LayoutInline.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace blink {
11
12 TEST(ElementRareDataTest, ComputedStyleStorage)
13 {
14 // Without LayoutObject
15 ElementRareData* rareData = ElementRareData::create(nullptr);
16 RefPtr<ComputedStyle> style = ComputedStyle::create();
17 rareData->setComputedStyle(style);
18 EXPECT_EQ(style.get(), rareData->computedStyle());
19
20 // With LayoutObject
21 LayoutObject* layoutObject = new LayoutInline(nullptr);
22 rareData = ElementRareData::create(layoutObject);
23 rareData->setComputedStyle(style);
24 EXPECT_EQ(style.get(), rareData->computedStyle());
25
26 rareData->setLayoutObject(nullptr);
27 delete layoutObject;
28 }
29
30 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ElementRareData.h ('k') | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698