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

Side by Side Diff: Source/core/editing/SurroundingTextTest.cpp

Issue 467943005: Allow passing mock FrameLoaderClient to DummyPageHolder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 3 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 "config.h" 5 #include "config.h"
6 #include "core/editing/SurroundingText.h" 6 #include "core/editing/SurroundingText.h"
7 7
8 #include "core/dom/Document.h"
8 #include "core/dom/Position.h" 9 #include "core/dom/Position.h"
9 #include "core/dom/Range.h" 10 #include "core/dom/Range.h"
10 #include "core/dom/Text.h" 11 #include "core/dom/Text.h"
11 #include "core/editing/VisibleSelection.h" 12 #include "core/editing/VisibleSelection.h"
12 #include "core/html/HTMLElement.h" 13 #include "core/html/HTMLElement.h"
13 #include "core/testing/DummyPageHolder.h" 14 #include "core/testing/DummyPageHolder.h"
14 #include <gtest/gtest.h> 15 #include <gtest/gtest.h>
15 16
16 using namespace blink; 17 using namespace blink;
17 18
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 VisibleSelection selection = select(0, 7); 256 VisibleSelection selection = select(0, 7);
256 SurroundingText surroundingText(*selection.firstRange(), 1337); 257 SurroundingText surroundingText(*selection.firstRange(), 1337);
257 258
258 EXPECT_EQ("This is outside of foo bar the selected node", surroundingTex t.content().simplifyWhiteSpace()); 259 EXPECT_EQ("This is outside of foo bar the selected node", surroundingTex t.content().simplifyWhiteSpace());
259 EXPECT_EQ(20u, surroundingText.startOffsetInContent()); 260 EXPECT_EQ(20u, surroundingText.startOffsetInContent());
260 EXPECT_EQ(27u, surroundingText.endOffsetInContent()); 261 EXPECT_EQ(27u, surroundingText.endOffsetInContent());
261 } 262 }
262 } 263 }
263 264
264 } // anonymous namespace 265 } // anonymous namespace
OLDNEW
« no previous file with comments | « Source/core/dom/ActiveDOMObjectTest.cpp ('k') | Source/core/html/HTMLFormControlElementTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698