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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSStyleDeclarationTest.cpp

Issue 2068053002: Rename Blink constants generated from IDL files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/CSSStyleDeclaration.h" 5 #include "core/css/CSSStyleDeclaration.h"
6 6
7 #include "core/css/CSSRuleList.h" 7 #include "core/css/CSSRuleList.h"
8 #include "core/css/CSSStyleRule.h" 8 #include "core/css/CSSStyleRule.h"
9 #include "core/css/CSSTestHelper.h" 9 #include "core/css/CSSTestHelper.h"
10 10
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 TEST(CSSStyleDeclarationTest, getPropertyShorthand) 15 TEST(CSSStyleDeclarationTest, getPropertyShorthand)
16 { 16 {
17 CSSTestHelper helper; 17 CSSTestHelper helper;
18 18
19 helper.addCSSRules("div { padding: var(--p); }"); 19 helper.addCSSRules("div { padding: var(--p); }");
20 ASSERT_TRUE(helper.cssRules()); 20 ASSERT_TRUE(helper.cssRules());
21 ASSERT_EQ(1u, helper.cssRules()->length()); 21 ASSERT_EQ(1u, helper.cssRules()->length());
22 ASSERT_EQ(CSSRule::STYLE_RULE, helper.cssRules()->item(0)->type()); 22 ASSERT_EQ(CSSRule::kStyleRule, helper.cssRules()->item(0)->type());
23 CSSStyleRule* styleRule = toCSSStyleRule(helper.cssRules()->item(0)); 23 CSSStyleRule* styleRule = toCSSStyleRule(helper.cssRules()->item(0));
24 CSSStyleDeclaration* style = styleRule->style(); 24 CSSStyleDeclaration* style = styleRule->style();
25 ASSERT_TRUE(style); 25 ASSERT_TRUE(style);
26 EXPECT_EQ(AtomicString(), style->getPropertyShorthand("padding")); 26 EXPECT_EQ(AtomicString(), style->getPropertyShorthand("padding"));
27 } 27 }
28 28
29 } // namespace blink 29 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSRule.h ('k') | third_party/WebKit/Source/core/css/CSSStyleRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698