| OLD | NEW |
| 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/CSSUnparsedValue.h" | 5 #include "core/css/cssom/CSSUnparsedValue.h" |
| 6 | 6 |
| 7 #include "core/css/cssom/CSSStyleVariableReferenceValue.h" | 7 #include "core/css/cssom/CSSStyleVariableReferenceValue.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 namespace cssom { |
| 11 | 12 |
| 12 namespace { | 13 namespace { |
| 13 | 14 |
| 14 StringOrCSSVariableReferenceValue getStringOrCSSVariableReferenceValue(String st
r) | 15 StringOrCSSVariableReferenceValue getStringOrCSSVariableReferenceValue(String st
r) |
| 15 { | 16 { |
| 16 StringOrCSSVariableReferenceValue temp; | 17 StringOrCSSVariableReferenceValue temp; |
| 17 temp.setString(str); | 18 temp.setString(str); |
| 18 return temp; | 19 return temp; |
| 19 } | 20 } |
| 20 | 21 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 102 |
| 102 EXPECT_TRUE(unparsedValue->fragmentAtIndex(1).isCSSVariableReferenceValue())
; | 103 EXPECT_TRUE(unparsedValue->fragmentAtIndex(1).isCSSVariableReferenceValue())
; |
| 103 EXPECT_FALSE(unparsedValue->fragmentAtIndex(1).isString()); | 104 EXPECT_FALSE(unparsedValue->fragmentAtIndex(1).isString()); |
| 104 EXPECT_EQ(unparsedValue->fragmentAtIndex(1).getAsCSSVariableReferenceValue()
, ref); | 105 EXPECT_EQ(unparsedValue->fragmentAtIndex(1).getAsCSSVariableReferenceValue()
, ref); |
| 105 | 106 |
| 106 EXPECT_TRUE(unparsedValue->fragmentAtIndex(2).isNull()); | 107 EXPECT_TRUE(unparsedValue->fragmentAtIndex(2).isNull()); |
| 107 } | 108 } |
| 108 | 109 |
| 109 } // namespace | 110 } // namespace |
| 110 | 111 |
| 112 } // namespace cssom |
| 111 } // namespace blink | 113 } // namespace blink |
| 114 |
| OLD | NEW |