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

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

Issue 2517653003: Drag-and-drop across OOPIFs. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 EXPECT_EQ(7, client.longpressY()); 2101 EXPECT_EQ(7, client.longpressY());
2102 2102
2103 // Explicitly reset to break dependency on locally scoped client. 2103 // Explicitly reset to break dependency on locally scoped client.
2104 m_webViewHelper.reset(); 2104 m_webViewHelper.reset();
2105 } 2105 }
2106 2106
2107 TEST_P(WebViewTest, ClientTapHandlingNullWebViewClient) { 2107 TEST_P(WebViewTest, ClientTapHandlingNullWebViewClient) {
2108 WebViewImpl* webView = 2108 WebViewImpl* webView =
2109 WebViewImpl::create(nullptr, WebPageVisibilityStateVisible); 2109 WebViewImpl::create(nullptr, WebPageVisibilityStateVisible);
2110 FrameTestHelpers::TestWebFrameClient webFrameClient; 2110 FrameTestHelpers::TestWebFrameClient webFrameClient;
2111 FrameTestHelpers::TestWebWidgetClient webWidgetClient;
2111 WebLocalFrame* localFrame = 2112 WebLocalFrame* localFrame =
2112 WebLocalFrame::create(WebTreeScopeType::Document, &webFrameClient); 2113 WebLocalFrame::create(WebTreeScopeType::Document, &webFrameClient);
2113 webView->setMainFrame(localFrame); 2114 webView->setMainFrame(localFrame);
2115
2116 // TODO(dcheng): The main frame widget currently has a special case.
2117 // Eliminate this once WebView is no longer a WebWidget.
2118 blink::WebFrameWidget::create(&webWidgetClient, webView, localFrame);
2119
2114 WebGestureEvent event; 2120 WebGestureEvent event;
2115 event.type = WebInputEvent::GestureTap; 2121 event.type = WebInputEvent::GestureTap;
2116 event.sourceDevice = WebGestureDeviceTouchscreen; 2122 event.sourceDevice = WebGestureDeviceTouchscreen;
2117 event.x = 3; 2123 event.x = 3;
2118 event.y = 8; 2124 event.y = 8;
2119 EXPECT_EQ(WebInputEventResult::NotHandled, webView->handleInputEvent(event)); 2125 EXPECT_EQ(WebInputEventResult::NotHandled, webView->handleInputEvent(event));
2120 webView->close(); 2126 webView->close();
2121 } 2127 }
2122 2128
2123 TEST_P(WebViewTest, LongPressEmptyDiv) { 2129 TEST_P(WebViewTest, LongPressEmptyDiv) {
(...skipping 2225 matching lines...) Expand 10 before | Expand all | Expand 10 after
4349 .translate(50, 55) 4355 .translate(50, 55)
4350 .scale(1. / 2.f); 4356 .scale(1. / 2.f);
4351 EXPECT_EQ(expectedMatrix, 4357 EXPECT_EQ(expectedMatrix,
4352 webViewImpl->getDeviceEmulationTransformForTesting()); 4358 webViewImpl->getDeviceEmulationTransformForTesting());
4353 // visibleContentRect doesn't change. 4359 // visibleContentRect doesn't change.
4354 EXPECT_EQ(IntRect(50, 55, 50, 75), 4360 EXPECT_EQ(IntRect(50, 55, 50, 75),
4355 *devToolsEmulator->visibleContentRectForPainting()); 4361 *devToolsEmulator->visibleContentRectForPainting());
4356 } 4362 }
4357 4363
4358 } // namespace blink 4364 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698