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

Side by Side Diff: third_party/WebKit/Source/core/dom/AttrTest.cpp

Issue 2775003003: Move Node::lengthOfContents into Range, its only user. (Closed)
Patch Set: const. Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698