OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/dom/Attr.h" | 5 #include "core/dom/Attr.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "testing/gmock/include/gmock/gmock.h" | 8 #include "testing/gmock/include/gmock/gmock.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 } | 55 } |
56 | 56 |
57 TEST_F(AttrTest, SetTextContent) { | 57 TEST_F(AttrTest, SetTextContent) { |
58 Attr* attr = createAttribute(); | 58 Attr* attr = createAttribute(); |
59 attr->setTextContent(value()); | 59 attr->setTextContent(value()); |
60 EXPECT_EQ(value(), attr->value()); | 60 EXPECT_EQ(value(), attr->value()); |
61 EXPECT_EQ(value(), attr->toNode()->nodeValue()); | 61 EXPECT_EQ(value(), attr->toNode()->nodeValue()); |
62 EXPECT_EQ(value(), attr->textContent()); | 62 EXPECT_EQ(value(), attr->textContent()); |
63 } | 63 } |
64 | 64 |
65 TEST_F(AttrTest, LengthOfContents) { | |
66 Attr* attr = createAttribute(); | |
67 EXPECT_EQ(0u, attr->lengthOfContents()); | |
68 attr->setValue(value()); | |
69 EXPECT_EQ(0u, attr->lengthOfContents()); | |
70 } | |
71 | |
72 } // namespace blink | 65 } // namespace blink |
OLD | NEW |