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

Unified Diff: ui/views/view_unittest.cc

Issue 2029733003: Views: Replace resource ids with ui::TextEditCommand enum for text editing commands in Textfield. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: === Created 4 years, 6 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
« no previous file with comments | « ui/views/linux_ui/linux_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view_unittest.cc
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index 3fcdf9e1e4bf220c76699cb0bcd5859b19405915..38f55bd11bda6778d8f6f43e028191d443c64df6 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -2029,21 +2029,21 @@ TEST_F(ViewTest, TextfieldCutCopyPaste) {
//
normal->SelectAll(false);
- normal->ExecuteCommand(IDS_APP_CUT);
+ normal->ExecuteCommand(IDS_APP_CUT, 0);
base::string16 result;
clipboard->ReadText(ui::CLIPBOARD_TYPE_COPY_PASTE, &result);
EXPECT_EQ(kNormalText, result);
normal->SetText(kNormalText); // Let's revert to the original content.
read_only->SelectAll(false);
- read_only->ExecuteCommand(IDS_APP_CUT);
+ read_only->ExecuteCommand(IDS_APP_CUT, 0);
result.clear();
clipboard->ReadText(ui::CLIPBOARD_TYPE_COPY_PASTE, &result);
// Cut should have failed, so the clipboard content should not have changed.
EXPECT_EQ(kNormalText, result);
password->SelectAll(false);
- password->ExecuteCommand(IDS_APP_CUT);
+ password->ExecuteCommand(IDS_APP_CUT, 0);
result.clear();
clipboard->ReadText(ui::CLIPBOARD_TYPE_COPY_PASTE, &result);
// Cut should have failed, so the clipboard content should not have changed.
@@ -2055,19 +2055,19 @@ TEST_F(ViewTest, TextfieldCutCopyPaste) {
// Start with |read_only| to observe a change in clipboard text.
read_only->SelectAll(false);
- read_only->ExecuteCommand(IDS_APP_COPY);
+ read_only->ExecuteCommand(IDS_APP_COPY, 0);
result.clear();
clipboard->ReadText(ui::CLIPBOARD_TYPE_COPY_PASTE, &result);
EXPECT_EQ(kReadOnlyText, result);
normal->SelectAll(false);
- normal->ExecuteCommand(IDS_APP_COPY);
+ normal->ExecuteCommand(IDS_APP_COPY, 0);
result.clear();
clipboard->ReadText(ui::CLIPBOARD_TYPE_COPY_PASTE, &result);
EXPECT_EQ(kNormalText, result);
password->SelectAll(false);
- password->ExecuteCommand(IDS_APP_COPY);
+ password->ExecuteCommand(IDS_APP_COPY, 0);
result.clear();
clipboard->ReadText(ui::CLIPBOARD_TYPE_COPY_PASTE, &result);
// Text cannot be copied from an obscured field; the clipboard won't change.
@@ -2079,18 +2079,18 @@ TEST_F(ViewTest, TextfieldCutCopyPaste) {
// Attempting to paste kNormalText in a read-only text-field should fail.
read_only->SelectAll(false);
- read_only->ExecuteCommand(IDS_APP_PASTE);
+ read_only->ExecuteCommand(IDS_APP_PASTE, 0);
EXPECT_EQ(kReadOnlyText, read_only->text());
password->SelectAll(false);
- password->ExecuteCommand(IDS_APP_PASTE);
+ password->ExecuteCommand(IDS_APP_PASTE, 0);
EXPECT_EQ(kNormalText, password->text());
// Copy from |read_only| to observe a change in the normal textfield text.
read_only->SelectAll(false);
- read_only->ExecuteCommand(IDS_APP_COPY);
+ read_only->ExecuteCommand(IDS_APP_COPY, 0);
normal->SelectAll(false);
- normal->ExecuteCommand(IDS_APP_PASTE);
+ normal->ExecuteCommand(IDS_APP_PASTE, 0);
EXPECT_EQ(kReadOnlyText, normal->text());
widget->CloseNow();
}
« no previous file with comments | « ui/views/linux_ui/linux_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698