| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ | 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 10 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 10 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // Overriden methods from BrowserPluginGuest to intercept in test objects. | 32 // Overriden methods from BrowserPluginGuest to intercept in test objects. |
| 33 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 33 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
| 34 virtual void SetFocus(bool focused) OVERRIDE; | 34 virtual void SetFocus(bool focused) OVERRIDE; |
| 35 virtual bool ViewTakeFocus(bool reverse) OVERRIDE; | 35 virtual bool ViewTakeFocus(bool reverse) OVERRIDE; |
| 36 | 36 |
| 37 // Test utilities to wait for a event we are interested in, returns true if we | 37 // Test utilities to wait for a event we are interested in, returns true if we |
| 38 // timed out waiting for the event to happen. | 38 // timed out waiting for the event to happen. |
| 39 // Waits until UpdateRect message is sent from the guest, meaning it is | 39 // Waits until UpdateRect message is sent from the guest, meaning it is |
| 40 // ready/rendered. | 40 // ready/rendered. |
| 41 bool WaitForUpdateRectMsg(); | 41 bool WaitForUpdateRectMsg(); |
| 42 void ResetUpdateRectCount(); |
| 43 |
| 42 // Waits until UpdateRect message with a specific size is sent from the guest. | 44 // Waits until UpdateRect message with a specific size is sent from the guest. |
| 43 bool WaitForUpdateRectMsgWithSize(int width, int height); | 45 bool WaitForUpdateRectMsgWithSize(int width, int height); |
| 44 // Waits until guest crashes. | 46 // Waits until guest crashes. |
| 45 bool WaitForCrashed(); | 47 bool WaitForCrashed(); |
| 46 // Waits for focus to reach this guest. | 48 // Waits for focus to reach this guest. |
| 47 bool WaitForFocus(); | 49 bool WaitForFocus(); |
| 48 bool WaitForAdvanceFocus(); | 50 bool WaitForAdvanceFocus(); |
| 49 | 51 |
| 50 private: | 52 private: |
| 51 // Overriden methods from BrowserPluginGuest to intercept in test objects. | 53 // Overriden methods from BrowserPluginGuest to intercept in test objects. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 68 scoped_refptr<MessageLoopRunner> crash_message_loop_runner_; | 70 scoped_refptr<MessageLoopRunner> crash_message_loop_runner_; |
| 69 scoped_refptr<MessageLoopRunner> focus_message_loop_runner_; | 71 scoped_refptr<MessageLoopRunner> focus_message_loop_runner_; |
| 70 scoped_refptr<MessageLoopRunner> advance_focus_message_loop_runner_; | 72 scoped_refptr<MessageLoopRunner> advance_focus_message_loop_runner_; |
| 71 | 73 |
| 72 DISALLOW_COPY_AND_ASSIGN(TestBrowserPluginGuest); | 74 DISALLOW_COPY_AND_ASSIGN(TestBrowserPluginGuest); |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 } // namespace content | 77 } // namespace content |
| 76 | 78 |
| 77 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ | 79 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |