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

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

Issue 2574793002: [Editing] Store |CommandSource| in |CompositeEditCommand| (Closed)
Patch Set: Created 4 years 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/ReplaceSelectionCommandTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp
index 3624499beb95d8747140ae69d0efd909d5174165..542fccab12937612c3aef639dd88ff1c425142b6 100644
--- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp
@@ -44,8 +44,8 @@ TEST_F(ReplaceSelectionCommandTest, pastingEmptySpan) {
ReplaceSelectionCommand::SanitizeFragment |
ReplaceSelectionCommand::SelectReplacement |
ReplaceSelectionCommand::SmartReplace;
- ReplaceSelectionCommand* command =
- ReplaceSelectionCommand::create(document(), fragment, options);
+ ReplaceSelectionCommand* command = ReplaceSelectionCommand::create(
+ document(), CommandSource::MenuOrKeyBinding, fragment, options);
EXPECT_TRUE(command->apply()) << "the replace command should have succeeded";
EXPECT_EQ("foo", document().body()->innerHTML()) << "no DOM tree mutation";
@@ -67,8 +67,8 @@ TEST_F(ReplaceSelectionCommandTest, pasteSpanInText) {
fragment->parseHTML("<span><div>bar</div></span>", bElement);
ReplaceSelectionCommand::CommandOptions options = 0;
- ReplaceSelectionCommand* command =
- ReplaceSelectionCommand::create(document(), fragment, options);
+ ReplaceSelectionCommand* command = ReplaceSelectionCommand::create(
+ document(), CommandSource::MenuOrKeyBinding, fragment, options);
EXPECT_TRUE(command->apply()) << "the replace command should have succeeded";
EXPECT_EQ("<b>t</b>bar<b>ext</b>", document().body()->innerHTML())
@@ -91,8 +91,8 @@ TEST_F(ReplaceSelectionCommandTest, styleTagsInPastedHeadIncludedInContent) {
document().documentElement(), DisallowScriptingAndPluginContent);
ReplaceSelectionCommand::CommandOptions options = 0;
- ReplaceSelectionCommand* command =
- ReplaceSelectionCommand::create(document(), fragment, options);
+ ReplaceSelectionCommand* command = ReplaceSelectionCommand::create(
+ document(), CommandSource::MenuOrKeyBinding, fragment, options);
EXPECT_TRUE(command->apply()) << "the replace command should have succeeded";
EXPECT_EQ(

Powered by Google App Engine
This is Rietveld 408576698