OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/pepper/plugin_instance_throttler_impl.h" | 5 #include "content/renderer/pepper/plugin_instance_throttler_impl.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
14 #include "content/public/renderer/render_frame.h" | 14 #include "content/public/renderer/render_frame.h" |
| 15 #include "skia/ext/platform_canvas.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 18 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
18 #include "third_party/WebKit/public/platform/WebMouseEvent.h" | 19 #include "third_party/WebKit/public/platform/WebMouseEvent.h" |
19 #include "third_party/WebKit/public/web/WebPluginParams.h" | 20 #include "third_party/WebKit/public/web/WebPluginParams.h" |
20 #include "ui/events/base_event_utils.h" | 21 #include "ui/events/base_event_utils.h" |
21 #include "ui/gfx/canvas.h" | 22 #include "ui/gfx/canvas.h" |
22 #include "url/gurl.h" | 23 #include "url/gurl.h" |
23 #include "url/origin.h" | 24 #include "url/origin.h" |
24 | 25 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 event.setModifiers(blink::WebInputEvent::Modifiers::MiddleButtonDown); | 215 event.setModifiers(blink::WebInputEvent::Modifiers::MiddleButtonDown); |
215 EXPECT_TRUE(throttler()->ConsumeInputEvent(event)); | 216 EXPECT_TRUE(throttler()->ConsumeInputEvent(event)); |
216 EXPECT_TRUE(throttler()->IsThrottled()); | 217 EXPECT_TRUE(throttler()->IsThrottled()); |
217 | 218 |
218 event.setModifiers(blink::WebInputEvent::Modifiers::LeftButtonDown); | 219 event.setModifiers(blink::WebInputEvent::Modifiers::LeftButtonDown); |
219 EXPECT_TRUE(throttler()->ConsumeInputEvent(event)); | 220 EXPECT_TRUE(throttler()->ConsumeInputEvent(event)); |
220 EXPECT_FALSE(throttler()->IsThrottled()); | 221 EXPECT_FALSE(throttler()->IsThrottled()); |
221 } | 222 } |
222 | 223 |
223 } // namespace content | 224 } // namespace content |
OLD | NEW |