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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp

Issue 2120153003: Remove keyIdentifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_key_identifier_3a
Patch Set: Rebase Created 4 years, 5 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "public/web/WebFrame.h" 47 #include "public/web/WebFrame.h"
48 #include "public/web/WebSettings.h" 48 #include "public/web/WebSettings.h"
49 #include "testing/gtest/include/gtest/gtest.h" 49 #include "testing/gtest/include/gtest/gtest.h"
50 #include "web/WebViewImpl.h" 50 #include "web/WebViewImpl.h"
51 #include "web/tests/FrameTestHelpers.h" 51 #include "web/tests/FrameTestHelpers.h"
52 52
53 namespace blink { 53 namespace blink {
54 54
55 KeyboardEvent* createKeyboardEventWithLocation(KeyboardEvent::KeyLocationCode lo cation) 55 KeyboardEvent* createKeyboardEventWithLocation(KeyboardEvent::KeyLocationCode lo cation)
56 { 56 {
57 return KeyboardEvent::create("keydown", true, true, 0, "", "", "", location, PlatformEvent::NoModifiers, 0); 57 return KeyboardEvent::create("keydown", true, true, 0, "", "", location, Pla tformEvent::NoModifiers, 0);
58 } 58 }
59 59
60 int getModifiersForKeyLocationCode(KeyboardEvent::KeyLocationCode location) 60 int getModifiersForKeyLocationCode(KeyboardEvent::KeyLocationCode location)
61 { 61 {
62 KeyboardEvent* event = createKeyboardEventWithLocation(location); 62 KeyboardEvent* event = createKeyboardEventWithLocation(location);
63 WebKeyboardEventBuilder convertedEvent(*event); 63 WebKeyboardEventBuilder convertedEvent(*event);
64 return convertedEvent.modifiers; 64 return convertedEvent.modifiers;
65 } 65 }
66 66
67 TEST(WebInputEventConversionTest, WebKeyboardEventBuilder) 67 TEST(WebInputEventConversionTest, WebKeyboardEventBuilder)
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 EXPECT_EQ(10, platformGestureBuilder.globalPosition().x()); 1082 EXPECT_EQ(10, platformGestureBuilder.globalPosition().x());
1083 EXPECT_EQ(15, platformGestureBuilder.globalPosition().y()); 1083 EXPECT_EQ(15, platformGestureBuilder.globalPosition().y());
1084 EXPECT_EQ(ScrollInertialPhaseNonMomentum, platformGestureBuilder.inertia lPhase()); 1084 EXPECT_EQ(ScrollInertialPhaseNonMomentum, platformGestureBuilder.inertia lPhase());
1085 EXPECT_TRUE(platformGestureBuilder.synthetic()); 1085 EXPECT_TRUE(platformGestureBuilder.synthetic());
1086 EXPECT_EQ(ScrollGranularity::ScrollByPage, platformGestureBuilder.deltaU nits()); 1086 EXPECT_EQ(ScrollGranularity::ScrollByPage, platformGestureBuilder.deltaU nits());
1087 EXPECT_EQ(12345U, platformGestureBuilder.uniqueTouchEventId()); 1087 EXPECT_EQ(12345U, platformGestureBuilder.uniqueTouchEventId());
1088 } 1088 }
1089 } 1089 }
1090 1090
1091 } // namespace blink 1091 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/KeyboardTest.cpp ('k') | third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698