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

Unified Diff: chrome/browser/ui/cocoa/browser_window_utils_unittest.mm

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Rebase Created 3 years, 12 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: chrome/browser/ui/cocoa/browser_window_utils_unittest.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_utils_unittest.mm b/chrome/browser/ui/cocoa/browser_window_utils_unittest.mm
index f691e99400c368587ee4124dac8284070f24906a..b9d9d4f6c4c55f4713c36420d9661a21c534195d 100644
--- a/chrome/browser/ui/cocoa/browser_window_utils_unittest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_utils_unittest.mm
@@ -26,15 +26,17 @@ const struct {
};
TEST(BrowserWindowUtilsTest, TestIsTextEditingEvent) {
- content::NativeWebKeyboardEvent event;
+ content::NativeWebKeyboardEvent event(WebInputEvent::Char,
+ WebInputEvent::NoModifiers,
+ WebInputEvent::TimeStampForTesting);
EXPECT_FALSE([BrowserWindowUtils isTextEditingEvent:event]);
for (const auto& test : kTextEditingEventTestCases) {
SCOPED_TRACE(base::StringPrintf("key = %c, modifiers = %d",
test.key_code, test.modifiers));
- content::NativeWebKeyboardEvent event;
+ content::NativeWebKeyboardEvent event(WebInputEvent::Char, test.modifiers,
+ WebInputEvent::TimeStampForTesting);
event.windowsKeyCode = test.key_code;
- event.modifiers = test.modifiers;
EXPECT_EQ(test.is_text_editing_event,
[BrowserWindowUtils isTextEditingEvent:event]);
}

Powered by Google App Engine
This is Rietveld 408576698