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

Side by Side Diff: Source/core/dom/NthIndexCacheTest.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/MainThreadTaskRunnerTest.cpp ('k') | Source/core/dom/RangeTest.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 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 "config.h" 5 #include "config.h"
6 #include "core/dom/NthIndexCache.h" 6 #include "core/dom/NthIndexCache.h"
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/html/HTMLElement.h" 9 #include "core/html/HTMLElement.h"
10 #include "core/testing/DummyPageHolder.h" 10 #include "core/testing/DummyPageHolder.h"
11 #include <gtest/gtest.h> 11 #include <gtest/gtest.h>
12 12
13 using namespace blink; 13 namespace blink {
14
15 namespace {
16 14
17 class NthIndexCacheTest : public ::testing::Test { 15 class NthIndexCacheTest : public ::testing::Test {
18
19 protected: 16 protected:
20 virtual void SetUp() override; 17 void SetUp() override;
21 18
22 Document& document() const { return m_dummyPageHolder->document(); } 19 Document& document() const { return m_dummyPageHolder->document(); }
23 void setHtmlInnerHTML(const char* htmlContent); 20 void setHtmlInnerHTML(const char* htmlContent);
24 21
25 private: 22 private:
26 OwnPtr<DummyPageHolder> m_dummyPageHolder; 23 OwnPtr<DummyPageHolder> m_dummyPageHolder;
27 }; 24 };
28 25
29 void NthIndexCacheTest::SetUp() 26 void NthIndexCacheTest::SetUp()
30 { 27 {
(...skipping 11 matching lines...) Expand all
42 "<span></span><span></span><span></span><span></span><span></span>" 39 "<span></span><span></span><span></span><span></span><span></span>"
43 "<span></span><span></span><span></span><span></span><span id=last></spa n>" 40 "<span></span><span></span><span></span><span></span><span id=last></spa n>"
44 "</body>", ASSERT_NO_EXCEPTION); 41 "</body>", ASSERT_NO_EXCEPTION);
45 42
46 NthIndexCache nthIndexCache(document()); 43 NthIndexCache nthIndexCache(document());
47 44
48 EXPECT_EQ(nthIndexCache.nthChildIndex(*document().getElementById("nth-child" )), 12U); 45 EXPECT_EQ(nthIndexCache.nthChildIndex(*document().getElementById("nth-child" )), 12U);
49 EXPECT_EQ(nthIndexCache.nthLastChildIndex(*document().getElementById("nth-la st-child")), 12U); 46 EXPECT_EQ(nthIndexCache.nthLastChildIndex(*document().getElementById("nth-la st-child")), 12U);
50 } 47 }
51 48
52 } // namespace 49 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/MainThreadTaskRunnerTest.cpp ('k') | Source/core/dom/RangeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698