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

Side by Side Diff: Source/core/dom/RangeTest.cpp

Issue 1171323003: Fix unit test style in core/{dom,editing,html}/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: whitespace fix Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/NthIndexCacheTest.cpp ('k') | Source/core/dom/TreeScopeTest.cpp » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "core/dom/Range.h" 6 #include "core/dom/Range.h"
7 7
8 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 8 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
9 #include "core/dom/Element.h" 9 #include "core/dom/Element.h"
10 #include "core/dom/NodeList.h" 10 #include "core/dom/NodeList.h"
11 #include "core/dom/Text.h" 11 #include "core/dom/Text.h"
12 #include "core/html/HTMLBodyElement.h" 12 #include "core/html/HTMLBodyElement.h"
13 #include "core/html/HTMLDocument.h" 13 #include "core/html/HTMLDocument.h"
14 #include "core/html/HTMLElement.h" 14 #include "core/html/HTMLElement.h"
15 #include "core/html/HTMLHtmlElement.h" 15 #include "core/html/HTMLHtmlElement.h"
16 #include "platform/heap/Handle.h" 16 #include "platform/heap/Handle.h"
17 #include "wtf/Compiler.h" 17 #include "wtf/Compiler.h"
18 #include "wtf/RefPtr.h" 18 #include "wtf/RefPtr.h"
19 #include "wtf/text/AtomicString.h" 19 #include "wtf/text/AtomicString.h"
20 #include <gtest/gtest.h> 20 #include <gtest/gtest.h>
21 21
22 using namespace blink; 22 namespace blink {
23
24 namespace {
25 23
26 class RangeTest : public ::testing::Test { 24 class RangeTest : public ::testing::Test {
27 protected: 25 protected:
28 virtual void SetUp() override; 26 void SetUp() override;
29 27
30 HTMLDocument& document() const; 28 HTMLDocument& document() const;
31 29
32 private: 30 private:
33 RefPtrWillBePersistent<HTMLDocument> m_document; 31 RefPtrWillBePersistent<HTMLDocument> m_document;
34 }; 32 };
35 33
36 void RangeTest::SetUp() 34 void RangeTest::SetUp()
37 { 35 {
38 m_document = HTMLDocument::create(); 36 m_document = HTMLDocument::create();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 EXPECT_EQ(innerRight, rangeInnerRight->endContainer()); 132 EXPECT_EQ(innerRight, rangeInnerRight->endContainer());
135 EXPECT_EQ(1, rangeInnerRight->endOffset()); 133 EXPECT_EQ(1, rangeInnerRight->endOffset());
136 134
137 EXPECT_TRUE(rangeFromTextToMiddleOfElement->boundaryPointsValid()); 135 EXPECT_TRUE(rangeFromTextToMiddleOfElement->boundaryPointsValid());
138 EXPECT_EQ(newText, rangeFromTextToMiddleOfElement->startContainer()); 136 EXPECT_EQ(newText, rangeFromTextToMiddleOfElement->startContainer());
139 EXPECT_EQ(3, rangeFromTextToMiddleOfElement->startOffset()); 137 EXPECT_EQ(3, rangeFromTextToMiddleOfElement->startOffset());
140 EXPECT_EQ(outer, rangeFromTextToMiddleOfElement->endContainer()); 138 EXPECT_EQ(outer, rangeFromTextToMiddleOfElement->endContainer());
141 EXPECT_EQ(4, rangeFromTextToMiddleOfElement->endOffset()); 139 EXPECT_EQ(4, rangeFromTextToMiddleOfElement->endOffset());
142 } 140 }
143 141
144 } 142 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/NthIndexCacheTest.cpp ('k') | Source/core/dom/TreeScopeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698