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

Side by Side Diff: third_party/WebKit/Source/core/editing/GranularityStrategyTest.cpp

Issue 1878473002: ASSERT -> DCHECK in core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Output info for some DCHECKs, add TODOs. Created 4 years, 8 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
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 "bindings/core/v8/ExceptionStatePlaceholder.h" 5 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
6 #include "core/dom/Document.h" 6 #include "core/dom/Document.h"
7 #include "core/dom/Element.h" 7 #include "core/dom/Element.h"
8 #include "core/dom/Text.h" 8 #include "core/dom/Text.h"
9 #include "core/editing/FrameSelection.h" 9 #include "core/editing/FrameSelection.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 private: 71 private:
72 OwnPtr<DummyPageHolder> m_dummyPageHolder; 72 OwnPtr<DummyPageHolder> m_dummyPageHolder;
73 Persistent<HTMLDocument> m_document; 73 Persistent<HTMLDocument> m_document;
74 }; 74 };
75 75
76 void GranularityStrategyTest::SetUp() 76 void GranularityStrategyTest::SetUp()
77 { 77 {
78 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); 78 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600));
79 m_document = toHTMLDocument(&m_dummyPageHolder->document()); 79 m_document = toHTMLDocument(&m_dummyPageHolder->document());
80 ASSERT(m_document); 80 DCHECK(m_document);
81 dummyPageHolder().frame().settings()->setDefaultFontSize(12); 81 dummyPageHolder().frame().settings()->setDefaultFontSize(12);
82 dummyPageHolder().frame().settings()->setSelectionStrategy(SelectionStrategy ::Direction); 82 dummyPageHolder().frame().settings()->setSelectionStrategy(SelectionStrategy ::Direction);
83 } 83 }
84 84
85 HTMLDocument& GranularityStrategyTest::document() const 85 HTMLDocument& GranularityStrategyTest::document() const
86 { 86 {
87 return *m_document; 87 return *m_document;
88 } 88 }
89 89
90 void GranularityStrategyTest::setSelection(const VisibleSelection& newSelection) 90 void GranularityStrategyTest::setSelection(const VisibleSelection& newSelection)
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 653
654 // "ab cd efghijkl ^mnopqr |>stuvwi inm," (^ means base and | means extent, 654 // "ab cd efghijkl ^mnopqr |>stuvwi inm," (^ means base and | means extent,
655 // > means end). 655 // > means end).
656 selection().setSelection(VisibleSelection(Position(text, 15), Position(text, 22))); 656 selection().setSelection(VisibleSelection(Position(text, 15), Position(text, 22)));
657 EXPECT_EQ_SELECTED_TEXT("mnopqr "); 657 EXPECT_EQ_SELECTED_TEXT("mnopqr ");
658 selection().moveRangeSelectionExtent(m_wordMiddles[4]); 658 selection().moveRangeSelectionExtent(m_wordMiddles[4]);
659 EXPECT_EQ_SELECTED_TEXT("mnopqr iiin"); 659 EXPECT_EQ_SELECTED_TEXT("mnopqr iiin");
660 } 660 }
661 661
662 } // namespace blink 662 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698