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 "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "third_party/WebKit/public/web/WebInputEvent.h" | 17 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
18 #include "third_party/WebKit/public/web/WebPluginParams.h" | 18 #include "third_party/WebKit/public/web/WebPluginParams.h" |
19 #include "ui/gfx/canvas.h" | 19 #include "ui/gfx/canvas.h" |
20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
21 #include "url/origin.h" | 21 #include "url/origin.h" |
22 | 22 |
23 using testing::_; | 23 using testing::_; |
24 using testing::Return; | 24 using testing::Return; |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 | 27 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 event.modifiers = blink::WebInputEvent::Modifiers::MiddleButtonDown; | 212 event.modifiers = blink::WebInputEvent::Modifiers::MiddleButtonDown; |
213 EXPECT_TRUE(throttler()->ConsumeInputEvent(event)); | 213 EXPECT_TRUE(throttler()->ConsumeInputEvent(event)); |
214 EXPECT_TRUE(throttler()->IsThrottled()); | 214 EXPECT_TRUE(throttler()->IsThrottled()); |
215 | 215 |
216 event.modifiers = blink::WebInputEvent::Modifiers::LeftButtonDown; | 216 event.modifiers = blink::WebInputEvent::Modifiers::LeftButtonDown; |
217 EXPECT_TRUE(throttler()->ConsumeInputEvent(event)); | 217 EXPECT_TRUE(throttler()->ConsumeInputEvent(event)); |
218 EXPECT_FALSE(throttler()->IsThrottled()); | 218 EXPECT_FALSE(throttler()->IsThrottled()); |
219 } | 219 } |
220 | 220 |
221 } // namespace content | 221 } // namespace content |
OLD | NEW |