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

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

Issue 2821633002: Remove WTF::String::DeprecatedUpper() (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/media/MediaDocument.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "platform/wtf/StringExtras.h" 9 #include "platform/wtf/StringExtras.h"
10 #include "public/platform/WebEditingCommandType.h" 10 #include "public/platform/WebEditingCommandType.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 } 51 }
52 52
53 TEST_F(EditingCommandTest, CreateCommandFromStringCaseFolding) { 53 TEST_F(EditingCommandTest, CreateCommandFromStringCaseFolding) {
54 Editor& dummy_editor = GetDocument().GetFrame()->GetEditor(); 54 Editor& dummy_editor = GetDocument().GetFrame()->GetEditor();
55 for (const auto& entry : kCommandNameEntries) { 55 for (const auto& entry : kCommandNameEntries) {
56 Editor::Command command = 56 Editor::Command command =
57 dummy_editor.CreateCommand(String(entry.name).DeprecatedLower()); 57 dummy_editor.CreateCommand(String(entry.name).DeprecatedLower());
58 EXPECT_EQ(static_cast<int>(entry.type), command.IdForHistogram()) 58 EXPECT_EQ(static_cast<int>(entry.type), command.IdForHistogram())
59 << entry.name; 59 << entry.name;
60 command = dummy_editor.CreateCommand(String(entry.name).DeprecatedUpper()); 60 command = dummy_editor.CreateCommand(String(entry.name).UpperASCII());
61 EXPECT_EQ(static_cast<int>(entry.type), command.IdForHistogram()) 61 EXPECT_EQ(static_cast<int>(entry.type), command.IdForHistogram())
62 << entry.name; 62 << entry.name;
63 } 63 }
64 } 64 }
65 65
66 TEST_F(EditingCommandTest, CreateCommandFromInvalidString) { 66 TEST_F(EditingCommandTest, CreateCommandFromInvalidString) {
67 const String kInvalidCommandName[] = { 67 const String kInvalidCommandName[] = {
68 "", "iNvAlId", "12345", 68 "", "iNvAlId", "12345",
69 }; 69 };
70 Editor& dummy_editor = GetDocument().GetFrame()->GetEditor(); 70 Editor& dummy_editor = GetDocument().GetFrame()->GetEditor();
71 for (const auto& command_name : kInvalidCommandName) { 71 for (const auto& command_name : kInvalidCommandName) {
72 Editor::Command command = dummy_editor.CreateCommand(command_name); 72 Editor::Command command = dummy_editor.CreateCommand(command_name);
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 | « no previous file | third_party/WebKit/Source/core/html/media/MediaDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698