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

Side by Side Diff: third_party/WebKit/Source/core/dom/TextTest.cpp

Issue 2178243002: Make ExceptionState parameter of ContainerNode::querySelector() as an optional parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-26T10:56:52 Created 4 years, 4 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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 "core/dom/Text.h" 5 #include "core/dom/Text.h"
6 6
7 #include "core/dom/Range.h" 7 #include "core/dom/Range.h"
8 #include "core/editing/EditingTestBase.h" 8 #include "core/editing/EditingTestBase.h"
9 #include "core/html/HTMLPreElement.h" 9 #include "core/html/HTMLPreElement.h"
10 #include "core/layout/LayoutText.h" 10 #include "core/layout/LayoutText.h"
(...skipping 13 matching lines...) Expand all
24 text->setData(" "); 24 text->setData(" ");
25 updateAllLifecyclePhases(); 25 updateAllLifecyclePhases();
26 26
27 EXPECT_FALSE(text->layoutObject()->isTextFragment()); 27 EXPECT_FALSE(text->layoutObject()->isTextFragment());
28 } 28 }
29 29
30 TEST_F(TextTest, RemoveFirstLetterPseudoElementWhenNoLetter) 30 TEST_F(TextTest, RemoveFirstLetterPseudoElementWhenNoLetter)
31 { 31 {
32 setBodyContent("<style>*::first-letter{font:icon;}</style><pre>AB\n</pre>"); 32 setBodyContent("<style>*::first-letter{font:icon;}</style><pre>AB\n</pre>");
33 33
34 Element* pre = document().querySelector("pre", ASSERT_NO_EXCEPTION); 34 Element* pre = document().querySelector("pre");
35 Text* text = toText(pre->firstChild()); 35 Text* text = toText(pre->firstChild());
36 36
37 Range* range = Range::create(document(), text, 0, text, 2); 37 Range* range = Range::create(document(), text, 0, text, 2);
38 range->deleteContents(ASSERT_NO_EXCEPTION); 38 range->deleteContents(ASSERT_NO_EXCEPTION);
39 updateAllLifecyclePhases(); 39 updateAllLifecyclePhases();
40 40
41 EXPECT_FALSE(text->layoutObject()->isTextFragment()); 41 EXPECT_FALSE(text->layoutObject()->isTextFragment());
42 } 42 }
43 43
44 } // namespace blink 44 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698