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

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

Issue 2636043002: Revert of [EditCommandSource] Pass source to |CompositEditCommand| and |TypingCommand| (3/3) (Closed)
Patch Set: Remove command source in ApplyStyleCommandTest.cpp Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 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/editing/commands/ApplyStyleCommand.h" 5 #include "core/editing/commands/ApplyStyleCommand.h"
6 6
7 #include "core/css/StylePropertySet.h" 7 #include "core/css/StylePropertySet.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/editing/EditingTestBase.h" 9 #include "core/editing/EditingTestBase.h"
10 #include "core/editing/FrameSelection.h" 10 #include "core/editing/FrameSelection.h"
(...skipping 26 matching lines...) Expand all
37 SelectionInDOMTree::Builder() 37 SelectionInDOMTree::Builder()
38 .collapse(Position(li, PositionAnchorType::BeforeAnchor)) 38 .collapse(Position(li, PositionAnchorType::BeforeAnchor))
39 .build()); 39 .build());
40 40
41 MutableStylePropertySet* style = 41 MutableStylePropertySet* style =
42 MutableStylePropertySet::create(HTMLQuirksMode); 42 MutableStylePropertySet::create(HTMLQuirksMode);
43 style->setProperty(CSSPropertyTextAlign, "center"); 43 style->setProperty(CSSPropertyTextAlign, "center");
44 ApplyStyleCommand::create(document(), EditingStyle::create(style), 44 ApplyStyleCommand::create(document(), EditingStyle::create(style),
45 InputEvent::InputType::FormatJustifyCenter, 45 InputEvent::InputType::FormatJustifyCenter,
46 ApplyStyleCommand::ForceBlockProperties) 46 ApplyStyleCommand::ForceBlockProperties)
47 ->apply(EditCommandSource::kDOM); 47 ->apply();
48 // Shouldn't crash. 48 // Shouldn't crash.
49 } 49 }
50 50
51 } // namespace blink 51 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698