| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1904 | 1904 |
| 1905 IntPoint hitPoint = IntPoint(30, 30); // button size is 100x100 | 1905 IntPoint hitPoint = IntPoint(30, 30); // button size is 100x100 |
| 1906 | 1906 |
| 1907 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); | 1907 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); |
| 1908 Document* document = frame->frame()->document(); | 1908 Document* document = frame->frame()->document(); |
| 1909 Element* element = document->getElementById("tap_button"); | 1909 Element* element = document->getElementById("tap_button"); |
| 1910 | 1910 |
| 1911 ASSERT_NE(nullptr, element); | 1911 ASSERT_NE(nullptr, element); |
| 1912 EXPECT_EQ(String("oldValue"), element->innerText()); | 1912 EXPECT_EQ(String("oldValue"), element->innerText()); |
| 1913 | 1913 |
| 1914 WebGestureEvent gestureEvent; | 1914 WebGestureEvent gestureEvent(WebInputEvent::GestureTap, |
| 1915 WebInputEvent::NoModifiers, |
| 1916 WebInputEvent::TimeStampForTesting); |
| 1915 gestureEvent.setFrameScale(1); | 1917 gestureEvent.setFrameScale(1); |
| 1916 gestureEvent.type = WebInputEvent::GestureTap; | |
| 1917 gestureEvent.x = gestureEvent.globalX = hitPoint.x(); | 1918 gestureEvent.x = gestureEvent.globalX = hitPoint.x(); |
| 1918 gestureEvent.y = gestureEvent.globalY = hitPoint.y(); | 1919 gestureEvent.y = gestureEvent.globalY = hitPoint.y(); |
| 1919 gestureEvent.sourceDevice = WebGestureDeviceTouchscreen; | 1920 gestureEvent.sourceDevice = WebGestureDeviceTouchscreen; |
| 1920 webViewHelper.webView() | 1921 webViewHelper.webView() |
| 1921 ->mainFrameImpl() | 1922 ->mainFrameImpl() |
| 1922 ->frame() | 1923 ->frame() |
| 1923 ->eventHandler() | 1924 ->eventHandler() |
| 1924 .handleGestureEvent(gestureEvent); | 1925 .handleGestureEvent(gestureEvent); |
| 1925 // when pressed, the button changes its own text to "updatedValue" | 1926 // when pressed, the button changes its own text to "updatedValue" |
| 1926 EXPECT_EQ(String("updatedValue"), element->innerText()); | 1927 EXPECT_EQ(String("updatedValue"), element->innerText()); |
| (...skipping 9308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11235 | 11236 |
| 11236 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); | 11237 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); |
| 11237 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); | 11238 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); |
| 11238 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); | 11239 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); |
| 11239 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); | 11240 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); |
| 11240 | 11241 |
| 11241 webViewHelper.reset(); | 11242 webViewHelper.reset(); |
| 11242 } | 11243 } |
| 11243 | 11244 |
| 11244 } // namespace blink | 11245 } // namespace blink |
| OLD | NEW |