OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 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 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "public/web/WebPluginContainer.h" | 31 #include "public/web/WebPluginContainer.h" |
32 | 32 |
33 #include <memory> | 33 #include <memory> |
34 #include <string> | 34 #include <string> |
35 #include "core/dom/Element.h" | 35 #include "core/dom/Element.h" |
36 #include "core/events/KeyboardEvent.h" | 36 #include "core/events/KeyboardEvent.h" |
| 37 #include "core/exported/WebViewBase.h" |
37 #include "core/frame/EventHandlerRegistry.h" | 38 #include "core/frame/EventHandlerRegistry.h" |
38 #include "core/layout/LayoutObject.h" | 39 #include "core/layout/LayoutObject.h" |
39 #include "core/page/Page.h" | 40 #include "core/page/Page.h" |
40 #include "platform/graphics/GraphicsContext.h" | 41 #include "platform/graphics/GraphicsContext.h" |
41 #include "platform/graphics/paint/CullRect.h" | 42 #include "platform/graphics/paint/CullRect.h" |
42 #include "platform/graphics/paint/ForeignLayerDisplayItem.h" | 43 #include "platform/graphics/paint/ForeignLayerDisplayItem.h" |
43 #include "platform/graphics/paint/PaintController.h" | 44 #include "platform/graphics/paint/PaintController.h" |
44 #include "platform/graphics/paint/PaintRecorder.h" | 45 #include "platform/graphics/paint/PaintRecorder.h" |
45 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" | 46 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" |
46 #include "platform/testing/URLTestHelpers.h" | 47 #include "platform/testing/URLTestHelpers.h" |
(...skipping 10 matching lines...) Expand all Loading... |
57 #include "public/web/WebElement.h" | 58 #include "public/web/WebElement.h" |
58 #include "public/web/WebFrame.h" | 59 #include "public/web/WebFrame.h" |
59 #include "public/web/WebFrameClient.h" | 60 #include "public/web/WebFrameClient.h" |
60 #include "public/web/WebPluginParams.h" | 61 #include "public/web/WebPluginParams.h" |
61 #include "public/web/WebPrintParams.h" | 62 #include "public/web/WebPrintParams.h" |
62 #include "public/web/WebSettings.h" | 63 #include "public/web/WebSettings.h" |
63 #include "public/web/WebView.h" | 64 #include "public/web/WebView.h" |
64 #include "testing/gtest/include/gtest/gtest.h" | 65 #include "testing/gtest/include/gtest/gtest.h" |
65 #include "web/WebLocalFrameImpl.h" | 66 #include "web/WebLocalFrameImpl.h" |
66 #include "web/WebPluginContainerImpl.h" | 67 #include "web/WebPluginContainerImpl.h" |
67 #include "web/WebViewImpl.h" | |
68 #include "web/tests/FakeWebPlugin.h" | 68 #include "web/tests/FakeWebPlugin.h" |
69 #include "web/tests/FrameTestHelpers.h" | 69 #include "web/tests/FrameTestHelpers.h" |
70 | 70 |
71 using blink::testing::RunPendingTasks; | 71 using blink::testing::RunPendingTasks; |
72 | 72 |
73 namespace blink { | 73 namespace blink { |
74 | 74 |
75 class WebPluginContainerTest : public ::testing::Test { | 75 class WebPluginContainerTest : public ::testing::Test { |
76 public: | 76 public: |
77 WebPluginContainerTest() : base_url_("http://www.test.com/") {} | 77 WebPluginContainerTest() : base_url_("http://www.test.com/") {} |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 web_view->MainFrame()->GetDocument().GetElementById( | 1070 web_view->MainFrame()->GetDocument().GetElementById( |
1071 WebString::FromUTF8("translated-plugin")); | 1071 WebString::FromUTF8("translated-plugin")); |
1072 plugin_container_one_element.PluginContainer()->SetWantsWheelEvents(true); | 1072 plugin_container_one_element.PluginContainer()->SetWantsWheelEvents(true); |
1073 | 1073 |
1074 RunPendingTasks(); | 1074 RunPendingTasks(); |
1075 EXPECT_TRUE(web_view->GetPage()->GetEventHandlerRegistry().HasEventHandlers( | 1075 EXPECT_TRUE(web_view->GetPage()->GetEventHandlerRegistry().HasEventHandlers( |
1076 EventHandlerRegistry::kWheelEventBlocking)); | 1076 EventHandlerRegistry::kWheelEventBlocking)); |
1077 } | 1077 } |
1078 | 1078 |
1079 } // namespace blink | 1079 } // namespace blink |
OLD | NEW |