OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 EXPECT_EQ(1, client.touchActionSetCount()) << failureContextPos; | 265 EXPECT_EQ(1, client.touchActionSetCount()) << failureContextPos; |
266 if (client.touchActionSetCount()) { | 266 if (client.touchActionSetCount()) { |
267 if (expectedAction == "none") { | 267 if (expectedAction == "none") { |
268 EXPECT_EQ(WebTouchActionNone, client.lastTouchAction())
<< failureContextPos; | 268 EXPECT_EQ(WebTouchActionNone, client.lastTouchAction())
<< failureContextPos; |
269 } else if (expectedAction == "pan-x") { | 269 } else if (expectedAction == "pan-x") { |
270 EXPECT_EQ(WebTouchActionPanX, client.lastTouchAction())
<< failureContextPos; | 270 EXPECT_EQ(WebTouchActionPanX, client.lastTouchAction())
<< failureContextPos; |
271 } else if (expectedAction == "pan-y") { | 271 } else if (expectedAction == "pan-y") { |
272 EXPECT_EQ(WebTouchActionPanY, client.lastTouchAction())
<< failureContextPos; | 272 EXPECT_EQ(WebTouchActionPanY, client.lastTouchAction())
<< failureContextPos; |
273 } else if (expectedAction == "pan-x-y") { | 273 } else if (expectedAction == "pan-x-y") { |
274 EXPECT_EQ((WebTouchActionPanX | WebTouchActionPanY), cli
ent.lastTouchAction()) << failureContextPos; | 274 EXPECT_EQ((WebTouchActionPanX | WebTouchActionPanY), cli
ent.lastTouchAction()) << failureContextPos; |
| 275 } else if (expectedAction == "manipulation") { |
| 276 EXPECT_EQ((WebTouchActionPanX | WebTouchActionPanY | Web
TouchActionPinchZoom), client.lastTouchAction()) << failureContextPos; |
275 } else { | 277 } else { |
276 FAIL() << "Unrecognized expected-action \"" << expectedA
ction.ascii().data() | 278 FAIL() << "Unrecognized expected-action \"" << expectedA
ction.ascii().data() |
277 << "\" " << failureContextPos; | 279 << "\" " << failureContextPos; |
278 } | 280 } |
279 } | 281 } |
280 } | 282 } |
281 | 283 |
282 // Reset webview touch state. | 284 // Reset webview touch state. |
283 client.reset(); | 285 client.reset(); |
284 sendTouchEvent(webView, WebInputEvent::TouchCancel, clientPoint); | 286 sendTouchEvent(webView, WebInputEvent::TouchCancel, clientPoint); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 { | 324 { |
323 runShadowDOMTest("touch-action-shadow-dom.html"); | 325 runShadowDOMTest("touch-action-shadow-dom.html"); |
324 } | 326 } |
325 | 327 |
326 TEST_F(TouchActionTest, Pan) | 328 TEST_F(TouchActionTest, Pan) |
327 { | 329 { |
328 runTouchActionTest("touch-action-pan.html"); | 330 runTouchActionTest("touch-action-pan.html"); |
329 } | 331 } |
330 | 332 |
331 } | 333 } |
OLD | NEW |