| OLD | NEW |
| 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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 EXPECT_EQ(15, platformWheelBuilder.deltaX()); | 1009 EXPECT_EQ(15, platformWheelBuilder.deltaX()); |
| 1010 EXPECT_EQ(10, platformWheelBuilder.deltaY()); | 1010 EXPECT_EQ(10, platformWheelBuilder.deltaY()); |
| 1011 EXPECT_EQ(PlatformEvent::AltKey, platformWheelBuilder.getModifiers()); | 1011 EXPECT_EQ(PlatformEvent::AltKey, platformWheelBuilder.getModifiers()); |
| 1012 EXPECT_TRUE(platformWheelBuilder.hasPreciseScrollingDeltas()); | 1012 EXPECT_TRUE(platformWheelBuilder.hasPreciseScrollingDeltas()); |
| 1013 EXPECT_EQ(platformWheelBuilder.getRailsMode(), PlatformEvent::RailsModeV
ertical); | 1013 EXPECT_EQ(platformWheelBuilder.getRailsMode(), PlatformEvent::RailsModeV
ertical); |
| 1014 } | 1014 } |
| 1015 } | 1015 } |
| 1016 | 1016 |
| 1017 TEST(WebInputEventConversionTest, PlatformGestureEventBuilder) | 1017 TEST(WebInputEventConversionTest, PlatformGestureEventBuilder) |
| 1018 { | 1018 { |
| 1019 const std::string baseURL("http://www.test8.com/"); | 1019 const std::string baseURL("http://www.test9.com/"); |
| 1020 const std::string fileName("fixed_layout.html"); | 1020 const std::string fileName("fixed_layout.html"); |
| 1021 | 1021 |
| 1022 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(baseURL.c_s
tr()), WebString::fromUTF8("fixed_layout.html")); | 1022 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(baseURL.c_s
tr()), WebString::fromUTF8("fixed_layout.html")); |
| 1023 FrameTestHelpers::WebViewHelper webViewHelper; | 1023 FrameTestHelpers::WebViewHelper webViewHelper; |
| 1024 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(baseURL + fileNam
e, true); | 1024 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(baseURL + fileNam
e, true); |
| 1025 int pageWidth = 640; | 1025 int pageWidth = 640; |
| 1026 int pageHeight = 480; | 1026 int pageHeight = 480; |
| 1027 webViewImpl->resize(WebSize(pageWidth, pageHeight)); | 1027 webViewImpl->resize(WebSize(pageWidth, pageHeight)); |
| 1028 webViewImpl->updateAllLifecyclePhases(); | 1028 webViewImpl->updateAllLifecyclePhases(); |
| 1029 | 1029 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |