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

Side by Side Diff: Source/core/dom/DocumentMarkerControllerTest.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/DOMImplementationTest.cpp ('k') | Source/core/dom/DocumentTest.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 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "core/dom/Range.h" 36 #include "core/dom/Range.h"
37 #include "core/dom/RenderedDocumentMarker.h" 37 #include "core/dom/RenderedDocumentMarker.h"
38 #include "core/dom/Text.h" 38 #include "core/dom/Text.h"
39 #include "core/html/HTMLElement.h" 39 #include "core/html/HTMLElement.h"
40 #include "core/testing/DummyPageHolder.h" 40 #include "core/testing/DummyPageHolder.h"
41 #include "wtf/PassRefPtr.h" 41 #include "wtf/PassRefPtr.h"
42 #include "wtf/RefPtr.h" 42 #include "wtf/RefPtr.h"
43 #include "wtf/testing/WTFTestHelpers.h" 43 #include "wtf/testing/WTFTestHelpers.h"
44 #include <gtest/gtest.h> 44 #include <gtest/gtest.h>
45 45
46 using namespace blink; 46 namespace blink {
47
48 namespace {
49 47
50 class DocumentMarkerControllerTest : public ::testing::Test { 48 class DocumentMarkerControllerTest : public ::testing::Test {
51 protected: 49 protected:
52 virtual void SetUp() override; 50 void SetUp() override;
53 51
54 Document& document() const { return *m_document; } 52 Document& document() const { return *m_document; }
55 DocumentMarkerController& markerController() const { return m_document->mark ers(); } 53 DocumentMarkerController& markerController() const { return m_document->mark ers(); }
56 54
57 PassRefPtrWillBeRawPtr<Text> createTextNode(const char*); 55 PassRefPtrWillBeRawPtr<Text> createTextNode(const char*);
58 void markNodeContents(PassRefPtrWillBeRawPtr<Node>); 56 void markNodeContents(PassRefPtrWillBeRawPtr<Node>);
59 void setBodyInnerHTML(const char*); 57 void setBodyInnerHTML(const char*);
60 58
61 private: 59 private:
62 OwnPtr<DummyPageHolder> m_dummyPageHolder; 60 OwnPtr<DummyPageHolder> m_dummyPageHolder;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 EXPECT_EQ(1u, renderedRects.size()); 210 EXPECT_EQ(1u, renderedRects.size());
213 EXPECT_NE(invalidRect, renderedRects[0]); 211 EXPECT_NE(invalidRect, renderedRects[0]);
214 212
215 div->setAttribute(HTMLNames::styleAttr, "margin: 200px"); 213 div->setAttribute(HTMLNames::styleAttr, "margin: 200px");
216 document().updateLayout(); 214 document().updateLayout();
217 Vector<IntRect> newRenderedRects = markerController().renderedRectsForMarker s(DocumentMarker::Spelling); 215 Vector<IntRect> newRenderedRects = markerController().renderedRectsForMarker s(DocumentMarker::Spelling);
218 EXPECT_EQ(1u, newRenderedRects.size()); 216 EXPECT_EQ(1u, newRenderedRects.size());
219 EXPECT_NE(renderedRects[0], newRenderedRects[0]); 217 EXPECT_NE(renderedRects[0], newRenderedRects[0]);
220 } 218 }
221 219
222 } 220 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/DOMImplementationTest.cpp ('k') | Source/core/dom/DocumentTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698