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

Side by Side Diff: ppapi/proxy/ppp_instance_proxy_unittest.cc

Issue 9391013: Make a global enum to differentiate impl & proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months 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 #include "base/synchronization/waitable_event.h" 5 #include "base/synchronization/waitable_event.h"
6 #include "ipc/ipc_message_utils.h" 6 #include "ipc/ipc_message_utils.h"
7 #include "ppapi/c/pp_var.h" 7 #include "ppapi/c/pp_var.h"
8 #include "ppapi/c/ppb_core.h" 8 #include "ppapi/c/ppb_core.h"
9 #include "ppapi/c/ppb_fullscreen.h" 9 #include "ppapi/c/ppb_fullscreen.h"
10 #include "ppapi/c/ppb_url_loader.h" 10 #include "ppapi/c/ppb_url_loader.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 PP_Rect expected_position = { {1, 2}, {3, 4} }; 157 PP_Rect expected_position = { {1, 2}, {3, 4} };
158 PP_Rect expected_clip = { {5, 6}, {7, 8} }; 158 PP_Rect expected_clip = { {5, 6}, {7, 8} };
159 ViewData data; 159 ViewData data;
160 data.rect = expected_position; 160 data.rect = expected_position;
161 data.is_fullscreen = false; 161 data.is_fullscreen = false;
162 data.is_page_visible = true; 162 data.is_page_visible = true;
163 data.clip_rect = expected_clip; 163 data.clip_rect = expected_clip;
164 ResetReceived(); 164 ResetReceived();
165 ScopedPPResource view_resource( 165 ScopedPPResource view_resource(
166 ScopedPPResource::PassRef(), 166 ScopedPPResource::PassRef(),
167 (new PPB_View_Shared(PPB_View_Shared::InitAsImpl(), 167 (new PPB_View_Shared(OBJECT_IS_IMPL,
168 expected_instance, data))->GetReference()); 168 expected_instance, data))->GetReference());
169 ppp_instance->DidChangeView(expected_instance, view_resource); 169 ppp_instance->DidChangeView(expected_instance, view_resource);
170 did_change_view_called.Wait(); 170 did_change_view_called.Wait();
171 EXPECT_EQ(received_instance, expected_instance); 171 EXPECT_EQ(received_instance, expected_instance);
172 EXPECT_EQ(received_position.point.x, expected_position.point.x); 172 EXPECT_EQ(received_position.point.x, expected_position.point.x);
173 EXPECT_EQ(received_position.point.y, expected_position.point.y); 173 EXPECT_EQ(received_position.point.y, expected_position.point.y);
174 EXPECT_EQ(received_position.size.width, expected_position.size.width); 174 EXPECT_EQ(received_position.size.width, expected_position.size.width);
175 EXPECT_EQ(received_position.size.height, expected_position.size.height); 175 EXPECT_EQ(received_position.size.height, expected_position.size.height);
176 EXPECT_EQ(received_clip.point.x, expected_clip.point.x); 176 EXPECT_EQ(received_clip.point.x, expected_clip.point.x);
177 EXPECT_EQ(received_clip.point.y, expected_clip.point.y); 177 EXPECT_EQ(received_clip.point.y, expected_clip.point.y);
(...skipping 10 matching lines...) Expand all
188 // TODO(dmichael): Need to mock out a resource Tracker to be able to test 188 // TODO(dmichael): Need to mock out a resource Tracker to be able to test
189 // HandleResourceLoad. It also requires 189 // HandleResourceLoad. It also requires
190 // PPB_Core.AddRefResource and for PPB_URLLoader to be 190 // PPB_Core.AddRefResource and for PPB_URLLoader to be
191 // registered. 191 // registered.
192 192
193 host().resource_tracker().DidDeleteInstance(expected_instance); 193 host().resource_tracker().DidDeleteInstance(expected_instance);
194 } 194 }
195 195
196 } // namespace proxy 196 } // namespace proxy
197 } // namespace ppapi 197 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698