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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommandTest.cpp

Issue 2627103003: [EditCommandSource] Pass source through |CompositeEditCommand| ctor instead of |apply(source)| (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommandTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommandTest.cpp b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommandTest.cpp
index 40129f6658de641ac32e9b1738611b20bdbae009..90994b16101af68684280a55f56d96084df0b8e4 100644
--- a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommandTest.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommandTest.cpp
@@ -44,9 +44,9 @@ TEST_F(ApplyBlockElementCommandTest, selectionCrossingOverBody) {
Position(document().getElementById("va")->firstChild(), 2))
.build());
- FormatBlockCommand* command =
- FormatBlockCommand::create(document(), HTMLNames::footerTag);
- command->apply(EditCommandSource::kMenuOrKeyBinding);
+ FormatBlockCommand* command = FormatBlockCommand::create(
+ document(), EditCommandSource::kMenuOrKeyBinding, HTMLNames::footerTag);
+ command->apply();
EXPECT_EQ(
"<body contenteditable=\"false\">\n"
@@ -68,9 +68,10 @@ TEST_F(ApplyBlockElementCommandTest, visibilityChangeDuringCommand) {
.collapse(Position(document().querySelector("li"), 0))
.build());
- IndentOutdentCommand* command =
- IndentOutdentCommand::create(document(), IndentOutdentCommand::Indent);
- command->apply(EditCommandSource::kMenuOrKeyBinding);
+ IndentOutdentCommand* command = IndentOutdentCommand::create(
+ document(), EditCommandSource::kMenuOrKeyBinding,
+ IndentOutdentCommand::Indent);
+ command->apply();
EXPECT_EQ(
"<head><style>li:first-child { visibility:visible; }</style></head>"

Powered by Google App Engine
This is Rietveld 408576698