Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/cssom/CSSURLImageValueTest.cpp |
| diff --git a/third_party/WebKit/Source/core/css/cssom/CSSURLImageValueTest.cpp b/third_party/WebKit/Source/core/css/cssom/CSSURLImageValueTest.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..22dcca67267a507ee6b437463ee56aa89567943c |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/css/cssom/CSSURLImageValueTest.cpp |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| + |
|
meade_UTC10
2016/08/12 05:35:32
Remove extra newline
anthonyhkf
2016/08/12 07:36:06
Done.
|
| +#include "core/css/cssom/CSSURLImageValue.h" |
| + |
| +#include "testing/gtest/include/gtest/gtest.h" |
| + |
| +namespace blink { |
| + |
| +namespace { |
| + |
| +void checkNullURLImageValue(CSSURLImageValue* urlImageValue) |
| +{ |
| + EXPECT_EQ(urlImageValue->state(), "unloaded"); |
| + bool isNull; |
| + EXPECT_EQ(urlImageValue->intrinsicWidth(isNull), 0); |
| + EXPECT_EQ(urlImageValue->intrinsicHeight(isNull), 0); |
| + EXPECT_EQ(urlImageValue->intrinsicRatio(isNull), 0); |
| + EXPECT_TRUE(isNull); |
| +} |
| + |
| +TEST(CSSURLImageValueTest, CreateURLImageValueFromURL) |
| +{ |
| + checkNullURLImageValue(CSSURLImageValue::create("https://s-media-cache-ak0.pinimg.com/736x/b7/49/fa/b749fa790b531d4fb8f2007bf74859f0.jpg")); |
|
meade_UTC10
2016/08/12 05:35:32
Likewise, don't use the URL here either :)
Maybe u
anthonyhkf
2016/08/12 07:36:06
Done.
|
| +} |
| + |
| +TEST(CSSURLImageValueTest, CreateURLImageValueFromImageValue) |
| +{ |
| + checkNullURLImageValue(CSSURLImageValue::create(CSSImageValue::create("http://example.com"))); |
|
meade_UTC10
2016/08/12 05:35:32
Same.
anthonyhkf
2016/08/12 07:36:06
Done.
|
| +} |
| + |
| +} // namespace |
| + |
| +} // namespace blink |