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 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1903 | 1903 |
1904 IntPoint hitPoint = IntPoint(30, 30); // button size is 100x100 | 1904 IntPoint hitPoint = IntPoint(30, 30); // button size is 100x100 |
1905 | 1905 |
1906 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); | 1906 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); |
1907 Document* document = frame->frame()->document(); | 1907 Document* document = frame->frame()->document(); |
1908 Element* element = document->getElementById("tap_button"); | 1908 Element* element = document->getElementById("tap_button"); |
1909 | 1909 |
1910 ASSERT_NE(nullptr, element); | 1910 ASSERT_NE(nullptr, element); |
1911 EXPECT_EQ(String("oldValue"), element->innerText()); | 1911 EXPECT_EQ(String("oldValue"), element->innerText()); |
1912 | 1912 |
1913 PlatformGestureEvent gestureEvent( | 1913 WebGestureEvent gestureEvent; |
1914 PlatformEvent::EventType::GestureTap, hitPoint, hitPoint, IntSize(0, 0), | 1914 gestureEvent.type = WebInputEvent::GestureTap; |
1915 0, PlatformEvent::NoModifiers, PlatformGestureSourceTouchscreen); | 1915 gestureEvent.x = gestureEvent.globalX = hitPoint.x(); |
| 1916 gestureEvent.y = gestureEvent.globalY = hitPoint.y(); |
| 1917 gestureEvent.sourceDevice = WebGestureDeviceTouchscreen; |
1916 webViewHelper.webView() | 1918 webViewHelper.webView() |
1917 ->mainFrameImpl() | 1919 ->mainFrameImpl() |
1918 ->frame() | 1920 ->frame() |
1919 ->eventHandler() | 1921 ->eventHandler() |
1920 .handleGestureEvent(gestureEvent); | 1922 .handleGestureEvent(gestureEvent); |
1921 // when pressed, the button changes its own text to "updatedValue" | 1923 // when pressed, the button changes its own text to "updatedValue" |
1922 EXPECT_EQ(String("updatedValue"), element->innerText()); | 1924 EXPECT_EQ(String("updatedValue"), element->innerText()); |
1923 } | 1925 } |
1924 | 1926 |
1925 TEST_F(WebFrameTest, FrameOwnerPropertiesMargin) { | 1927 TEST_F(WebFrameTest, FrameOwnerPropertiesMargin) { |
(...skipping 9017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10943 | 10945 |
10944 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); | 10946 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); |
10945 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); | 10947 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); |
10946 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); | 10948 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); |
10947 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); | 10949 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); |
10948 | 10950 |
10949 webViewHelper.reset(); | 10951 webViewHelper.reset(); |
10950 } | 10952 } |
10951 | 10953 |
10952 } // namespace blink | 10954 } // namespace blink |
OLD | NEW |