| OLD | NEW |
| 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 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1840 dragData.initialize(); | 1840 dragData.initialize(); |
| 1841 | 1841 |
| 1842 WebDragData::Item item; | 1842 WebDragData::Item item; |
| 1843 item.storageType = WebDragData::Item::StorageTypeString; | 1843 item.storageType = WebDragData::Item::StorageTypeString; |
| 1844 item.stringType = "text/uri-list"; | 1844 item.stringType = "text/uri-list"; |
| 1845 item.stringData = WebString::fromUTF8(url); | 1845 item.stringData = WebString::fromUTF8(url); |
| 1846 dragData.addItem(item); | 1846 dragData.addItem(item); |
| 1847 | 1847 |
| 1848 const WebPoint clientPoint(0, 0); | 1848 const WebPoint clientPoint(0, 0); |
| 1849 const WebPoint screenPoint(0, 0); | 1849 const WebPoint screenPoint(0, 0); |
| 1850 webView->dragTargetDragEnter(dragData, clientPoint, screenPoint, | 1850 WebFrameWidgetBase* widget = webView->mainFrameImpl()->frameWidget(); |
| 1851 WebDragOperationCopy, 0); | 1851 widget->dragTargetDragEnter(dragData, clientPoint, screenPoint, |
| 1852 webView->dragTargetDrop(dragData, clientPoint, screenPoint, 0); | 1852 WebDragOperationCopy, 0); |
| 1853 widget->dragTargetDrop(dragData, clientPoint, screenPoint, 0); |
| 1853 FrameTestHelpers::pumpPendingRequestsForFrameToLoad(webView->mainFrame()); | 1854 FrameTestHelpers::pumpPendingRequestsForFrameToLoad(webView->mainFrame()); |
| 1854 } | 1855 } |
| 1855 | 1856 |
| 1856 TEST_P(WebViewTest, DragDropURL) { | 1857 TEST_P(WebViewTest, DragDropURL) { |
| 1857 URLTestHelpers::registerMockedURLFromBaseURL( | 1858 URLTestHelpers::registerMockedURLFromBaseURL( |
| 1858 WebString::fromUTF8(m_baseURL.c_str()), "foo.html"); | 1859 WebString::fromUTF8(m_baseURL.c_str()), "foo.html"); |
| 1859 URLTestHelpers::registerMockedURLFromBaseURL( | 1860 URLTestHelpers::registerMockedURLFromBaseURL( |
| 1860 WebString::fromUTF8(m_baseURL.c_str()), "bar.html"); | 1861 WebString::fromUTF8(m_baseURL.c_str()), "bar.html"); |
| 1861 | 1862 |
| 1862 const std::string fooUrl = m_baseURL + "foo.html"; | 1863 const std::string fooUrl = m_baseURL + "foo.html"; |
| (...skipping 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4316 .translate(50, 55) | 4317 .translate(50, 55) |
| 4317 .scale(1. / 2.f); | 4318 .scale(1. / 2.f); |
| 4318 EXPECT_EQ(expectedMatrix, | 4319 EXPECT_EQ(expectedMatrix, |
| 4319 webViewImpl->getDeviceEmulationTransformForTesting()); | 4320 webViewImpl->getDeviceEmulationTransformForTesting()); |
| 4320 // visibleContentRect doesn't change. | 4321 // visibleContentRect doesn't change. |
| 4321 EXPECT_EQ(IntRect(50, 55, 50, 75), | 4322 EXPECT_EQ(IntRect(50, 55, 50, 75), |
| 4322 *devToolsEmulator->visibleContentRectForPainting()); | 4323 *devToolsEmulator->visibleContentRectForPainting()); |
| 4323 } | 4324 } |
| 4324 | 4325 |
| 4325 } // namespace blink | 4326 } // namespace blink |
| OLD | NEW |