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

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/CSSURLImageValueTest.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/CSSURLImageValue.h" 5 #include "core/css/cssom/CSSURLImageValue.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 void checkNullURLImageValue(CSSURLImageValue* urlImageValue) 14 void checkNullURLImageValue(CSSURLImageValue* urlImageValue)
14 { 15 {
15 EXPECT_EQ(urlImageValue->state(), "unloaded"); 16 EXPECT_EQ(urlImageValue->state(), "unloaded");
16 bool isNull; 17 bool isNull;
17 EXPECT_EQ(urlImageValue->intrinsicWidth(isNull), 0); 18 EXPECT_EQ(urlImageValue->intrinsicWidth(isNull), 0);
18 EXPECT_EQ(urlImageValue->intrinsicHeight(isNull), 0); 19 EXPECT_EQ(urlImageValue->intrinsicHeight(isNull), 0);
19 EXPECT_EQ(urlImageValue->intrinsicRatio(isNull), 0); 20 EXPECT_EQ(urlImageValue->intrinsicRatio(isNull), 0);
20 EXPECT_TRUE(isNull); 21 EXPECT_TRUE(isNull);
21 } 22 }
22 23
23 TEST(CSSURLImageValueTest, CreateURLImageValueFromURL) 24 TEST(CSSURLImageValueTest, CreateURLImageValueFromURL)
24 { 25 {
25 checkNullURLImageValue(CSSURLImageValue::create("http://localhost")); 26 checkNullURLImageValue(CSSURLImageValue::create("http://localhost"));
26 } 27 }
27 28
28 TEST(CSSURLImageValueTest, CreateURLImageValueFromImageValue) 29 TEST(CSSURLImageValueTest, CreateURLImageValueFromImageValue)
29 { 30 {
30 checkNullURLImageValue(CSSURLImageValue::create(CSSImageValue::create("http: //localhost"))); 31 checkNullURLImageValue(CSSURLImageValue::create(CSSImageValue::create("http: //localhost")));
31 } 32 }
32 33
33 } // namespace 34 } // namespace
34 35
36 } // namespace cssom
35 } // namespace blink 37 } // namespace blink
38
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698