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

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

Issue 2539283002: Remove PlatformGestureEvent in favour of using WebGestureEvent (Closed)
Patch Set: Add missing copyright on new file Created 4 years 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) 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
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 PlatformGestureEvent gestureEvent(PlatformEvent::EventType::GestureTap, 1914 WebGestureEvent gestureEvent;
1915 hitPoint, hitPoint, IntSize(0, 0), 1915 gestureEvent.setFrameScale(1);
1916 TimeTicks(), PlatformEvent::NoModifiers, 1916 gestureEvent.type = WebInputEvent::GestureTap;
1917 PlatformGestureSourceTouchscreen); 1917 gestureEvent.x = gestureEvent.globalX = hitPoint.x();
1918 gestureEvent.y = gestureEvent.globalY = hitPoint.y();
1919 gestureEvent.sourceDevice = WebGestureDeviceTouchscreen;
1918 webViewHelper.webView() 1920 webViewHelper.webView()
1919 ->mainFrameImpl() 1921 ->mainFrameImpl()
1920 ->frame() 1922 ->frame()
1921 ->eventHandler() 1923 ->eventHandler()
1922 .handleGestureEvent(gestureEvent); 1924 .handleGestureEvent(gestureEvent);
1923 // when pressed, the button changes its own text to "updatedValue" 1925 // when pressed, the button changes its own text to "updatedValue"
1924 EXPECT_EQ(String("updatedValue"), element->innerText()); 1926 EXPECT_EQ(String("updatedValue"), element->innerText());
1925 } 1927 }
1926 1928
1927 TEST_F(WebFrameTest, FrameOwnerPropertiesMargin) { 1929 TEST_F(WebFrameTest, FrameOwnerPropertiesMargin) {
(...skipping 9167 matching lines...) Expand 10 before | Expand all | Expand 10 after
11095 11097
11096 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); 11098 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached());
11097 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); 11099 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading());
11098 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); 11100 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad());
11099 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); 11101 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents());
11100 11102
11101 webViewHelper.reset(); 11103 webViewHelper.reset();
11102 } 11104 }
11103 11105
11104 } // namespace blink 11106 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698