Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: content/browser/browser_plugin/test_browser_plugin_guest.h

Issue 11360106: Browser Plugin: Implement AutoSize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed nits + added tests Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Waits until guest exits. 70 // Waits until guest exits.
71 void WaitForExit(); 71 void WaitForExit();
72 // Waits until a reload request is observed. 72 // Waits until a reload request is observed.
73 void WaitForReload(); 73 void WaitForReload();
74 // Waits until a stop request is observed. 74 // Waits until a stop request is observed.
75 void WaitForStop(); 75 void WaitForStop();
76 // Waits until input is observed. 76 // Waits until input is observed.
77 void WaitForInput(); 77 void WaitForInput();
78 // Waits until 'loadstop' is observed. 78 // Waits until 'loadstop' is observed.
79 void WaitForLoadStop(); 79 void WaitForLoadStop();
80 // Waits until UpdateRect with a particular |view_size| is observed.
81 void WaitForViewSize(const gfx::Size& view_size);
80 82
81 private: 83 private:
82 // Overridden methods from BrowserPluginGuest to intercept in test objects. 84 // Overridden methods from BrowserPluginGuest to intercept in test objects.
83 virtual void SendMessageToEmbedder(IPC::Message* msg) OVERRIDE; 85 virtual void SendMessageToEmbedder(IPC::Message* msg) OVERRIDE;
84 86
85 int update_rect_count_; 87 int update_rect_count_;
86 int damage_buffer_call_count_; 88 int damage_buffer_call_count_;
87 bool exit_observed_; 89 bool exit_observed_;
88 bool focus_observed_; 90 bool focus_observed_;
89 bool advance_focus_observed_; 91 bool advance_focus_observed_;
90 bool was_hidden_observed_; 92 bool was_hidden_observed_;
91 bool stop_observed_; 93 bool stop_observed_;
92 bool reload_observed_; 94 bool reload_observed_;
93 bool set_damage_buffer_observed_; 95 bool set_damage_buffer_observed_;
94 bool input_observed_; 96 bool input_observed_;
95 bool load_stop_observed_; 97 bool load_stop_observed_;
98 gfx::Size last_view_size_observed_;
99 gfx::Size auto_view_size_;
lazyboy 2012/11/07 07:39:09 rename to expected_auto_view_size_, otherwise a bi
Fady Samuel 2012/11/07 20:21:12 Done.
96 100
97 // For WaitForDamageBufferWithSize(). 101 // For WaitForDamageBufferWithSize().
98 bool waiting_for_damage_buffer_with_size_; 102 bool waiting_for_damage_buffer_with_size_;
99 gfx::Size expected_damage_buffer_size_; 103 gfx::Size expected_damage_buffer_size_;
100 gfx::Size last_damage_buffer_size_; 104 gfx::Size last_damage_buffer_size_;
101 105
102 scoped_refptr<MessageLoopRunner> send_message_loop_runner_; 106 scoped_refptr<MessageLoopRunner> send_message_loop_runner_;
103 scoped_refptr<MessageLoopRunner> crash_message_loop_runner_; 107 scoped_refptr<MessageLoopRunner> crash_message_loop_runner_;
104 scoped_refptr<MessageLoopRunner> focus_message_loop_runner_; 108 scoped_refptr<MessageLoopRunner> focus_message_loop_runner_;
105 scoped_refptr<MessageLoopRunner> advance_focus_message_loop_runner_; 109 scoped_refptr<MessageLoopRunner> advance_focus_message_loop_runner_;
106 scoped_refptr<MessageLoopRunner> was_hidden_message_loop_runner_; 110 scoped_refptr<MessageLoopRunner> was_hidden_message_loop_runner_;
107 scoped_refptr<MessageLoopRunner> reload_message_loop_runner_; 111 scoped_refptr<MessageLoopRunner> reload_message_loop_runner_;
108 scoped_refptr<MessageLoopRunner> stop_message_loop_runner_; 112 scoped_refptr<MessageLoopRunner> stop_message_loop_runner_;
109 scoped_refptr<MessageLoopRunner> damage_buffer_message_loop_runner_; 113 scoped_refptr<MessageLoopRunner> damage_buffer_message_loop_runner_;
110 scoped_refptr<MessageLoopRunner> input_message_loop_runner_; 114 scoped_refptr<MessageLoopRunner> input_message_loop_runner_;
111 scoped_refptr<MessageLoopRunner> load_stop_message_loop_runner_; 115 scoped_refptr<MessageLoopRunner> load_stop_message_loop_runner_;
116 scoped_refptr<MessageLoopRunner> auto_view_size_message_loop_runner_;
112 117
113 DISALLOW_COPY_AND_ASSIGN(TestBrowserPluginGuest); 118 DISALLOW_COPY_AND_ASSIGN(TestBrowserPluginGuest);
114 }; 119 };
115 120
116 } // namespace content 121 } // namespace content
117 122
118 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ 123 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698