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

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

Issue 2611823003: ABANDONED CL: Changes to compile and pass tests after Big Blink Rename (excluding functions). (Closed)
Patch Set: Inducing merge conflicts to force human review and changes after rename. 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 (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/editing/EditingTestBase.h" 5 #include "core/editing/EditingTestBase.h"
6 #include "core/editing/Editor.h" 6 #include "core/editing/Editor.h"
7 #include "core/editing/commands/EditorCommandNames.h" 7 #include "core/editing/commands/EditorCommandNames.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "public/platform/WebEditingCommandType.h" 9 #include "public/platform/WebEditingCommandType.h"
10 #include "wtf/StringExtras.h" 10 #include "wtf/StringExtras.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 namespace { 14 namespace {
15 15
16 struct CommandNameEntry { 16 struct CommandNameEntry {
17 const char* name; 17 const char* name;
18 WebEditingCommandType type; 18 WebEditingCommandType type;
19 }; 19 };
20 20
21 const CommandNameEntry kCommandNameEntries[] = { 21 const CommandNameEntry kCommandNameEntries[] = {
22 #define V(name) {#name, WebEditingCommandType::name}, 22 #define V(name) {#name, WebEditingCommandType::k##name},
23 FOR_EACH_BLINK_EDITING_COMMAND_NAME(V) 23 FOR_EACH_BLINK_EDITING_COMMAND_NAME(V)
24 #undef V 24 #undef V
25 }; 25 };
26 // Test all commands except WebEditingCommandType::Invalid. 26 // Test all commands except WebEditingCommandType::Invalid.
27 static_assert( 27 static_assert(
28 arraysize(kCommandNameEntries) + 1 == 28 arraysize(kCommandNameEntries) + 1 ==
29 static_cast<size_t>(WebEditingCommandType::NumberOfCommandTypes), 29 static_cast<size_t>(WebEditingCommandType::NumberOfCommandTypes),
30 "must test all valid WebEditingCommandType"); 30 "must test all valid WebEditingCommandType");
31 31
32 } // anonymous namespace 32 } // anonymous namespace
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 "", "iNvAlId", "12345", 68 "", "iNvAlId", "12345",
69 }; 69 };
70 Editor& dummyEditor = document().frame()->editor(); 70 Editor& dummyEditor = document().frame()->editor();
71 for (const auto& commandName : kInvalidCommandName) { 71 for (const auto& commandName : kInvalidCommandName) {
72 Editor::Command command = dummyEditor.createCommand(commandName); 72 Editor::Command command = dummyEditor.createCommand(commandName);
73 EXPECT_EQ(0, command.idForHistogram()); 73 EXPECT_EQ(0, command.idForHistogram());
74 } 74 }
75 } 75 }
76 76
77 } // namespace blink 77 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698