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

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

Issue 2367663002: [WIP] Attempt to move everything cssom into a cssom namespace (Closed)
Patch Set: Created 4 years, 3 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/cssom/CSSStyleImageValue.h" 5 #include "core/css/cssom/CSSStyleImageValue.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace blink { 9 namespace blink {
10 namespace cssom {
10 11
11 namespace { 12 namespace {
12 13
13 class FakeCSSStyleImageValue : public CSSStyleImageValue { 14 class FakeCSSStyleImageValue : public CSSStyleImageValue {
14 public: 15 public:
15 FakeCSSStyleImageValue(CSSImageValue* imageValue, bool cachePending, LayoutS ize layoutSize) 16 FakeCSSStyleImageValue(CSSImageValue* imageValue, bool cachePending, LayoutS ize layoutSize)
16 : CSSStyleImageValue(imageValue) 17 : CSSStyleImageValue(imageValue)
17 , m_cachePending(cachePending) 18 , m_cachePending(cachePending)
18 , m_layoutSize(layoutSize) 19 , m_layoutSize(layoutSize)
19 { 20 {
(...skipping 24 matching lines...) Expand all
44 FakeCSSStyleImageValue* styleImageValue = new FakeCSSStyleImageValue(CSSImag eValue::create(""), false, LayoutSize(480, 120)); 45 FakeCSSStyleImageValue* styleImageValue = new FakeCSSStyleImageValue(CSSImag eValue::create(""), false, LayoutSize(480, 120));
45 bool isNull; 46 bool isNull;
46 EXPECT_EQ(styleImageValue->intrinsicWidth(isNull), 480); 47 EXPECT_EQ(styleImageValue->intrinsicWidth(isNull), 480);
47 EXPECT_EQ(styleImageValue->intrinsicHeight(isNull), 120); 48 EXPECT_EQ(styleImageValue->intrinsicHeight(isNull), 120);
48 EXPECT_EQ(styleImageValue->intrinsicRatio(isNull), 4); 49 EXPECT_EQ(styleImageValue->intrinsicRatio(isNull), 4);
49 EXPECT_FALSE(isNull); 50 EXPECT_FALSE(isNull);
50 } 51 }
51 52
52 } // namespace 53 } // namespace
53 54
55 } // namespace cssom
54 } // namespace blink 56 } // namespace blink
57
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698