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

Side by Side Diff: content/public/test/render_view_test.cc

Issue 2381493003: Move ViewMsg_New to mojom (Closed)
Patch Set: . Created 4 years, 2 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
« no previous file with comments | « content/public/common/BUILD.gn ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/public/test/render_view_test.h" 5 #include "content/public/test/render_view_test.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cctype> 9 #include <cctype>
10 10
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "content/app/mojo/mojo_init.h" 16 #include "content/app/mojo/mojo_init.h"
17 #include "content/common/dom_storage/dom_storage_types.h" 17 #include "content/common/dom_storage/dom_storage_types.h"
18 #include "content/common/frame_messages.h" 18 #include "content/common/frame_messages.h"
19 #include "content/common/input_messages.h" 19 #include "content/common/input_messages.h"
20 #include "content/common/renderer.mojom.h"
20 #include "content/common/resize_params.h" 21 #include "content/common/resize_params.h"
21 #include "content/common/site_isolation_policy.h" 22 #include "content/common/site_isolation_policy.h"
22 #include "content/common/view_messages.h" 23 #include "content/common/view_messages.h"
23 #include "content/public/browser/content_browser_client.h" 24 #include "content/public/browser/content_browser_client.h"
24 #include "content/public/browser/native_web_keyboard_event.h" 25 #include "content/public/browser/native_web_keyboard_event.h"
25 #include "content/public/common/content_client.h" 26 #include "content/public/common/content_client.h"
26 #include "content/public/common/renderer_preferences.h" 27 #include "content/public/common/renderer_preferences.h"
27 #include "content/public/renderer/content_renderer_client.h" 28 #include "content/public/renderer/content_renderer_client.h"
28 #include "content/public/test/frame_load_waiter.h" 29 #include "content/public/test/frame_load_waiter.h"
29 #include "content/renderer/history_controller.h" 30 #include "content/renderer/history_controller.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // ResourceBundle isn't initialized (since we have to use a diferent test 281 // ResourceBundle isn't initialized (since we have to use a diferent test
281 // suite implementation than for content_unittests). For browser_tests, this 282 // suite implementation than for content_unittests). For browser_tests, this
282 // is already initialized. 283 // is already initialized.
283 if (!ui::ResourceBundle::HasSharedInstance()) 284 if (!ui::ResourceBundle::HasSharedInstance())
284 ui::ResourceBundle::InitSharedInstanceWithLocale( 285 ui::ResourceBundle::InitSharedInstanceWithLocale(
285 "en-US", NULL, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES); 286 "en-US", NULL, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES);
286 287
287 compositor_deps_.reset(new FakeCompositorDependencies); 288 compositor_deps_.reset(new FakeCompositorDependencies);
288 mock_process_.reset(new MockRenderProcess); 289 mock_process_.reset(new MockRenderProcess);
289 290
290 ViewMsg_New_Params view_params; 291 mojom::CreateViewParams view_params;
291 view_params.opener_frame_route_id = MSG_ROUTING_NONE; 292 view_params.opener_frame_route_id = MSG_ROUTING_NONE;
292 view_params.window_was_created_with_opener = false; 293 view_params.window_was_created_with_opener = false;
293 view_params.renderer_preferences = RendererPreferences(); 294 view_params.renderer_preferences = RendererPreferences();
294 view_params.web_preferences = WebPreferences(); 295 view_params.web_preferences = WebPreferences();
295 view_params.view_id = kRouteId; 296 view_params.view_id = kRouteId;
296 view_params.main_frame_routing_id = kMainFrameRouteId; 297 view_params.main_frame_routing_id = kMainFrameRouteId;
297 view_params.main_frame_widget_routing_id = kMainFrameWidgetRouteId; 298 view_params.main_frame_widget_routing_id = kMainFrameWidgetRouteId;
298 view_params.session_storage_namespace_id = kInvalidSessionStorageNamespaceId; 299 view_params.session_storage_namespace_id = kInvalidSessionStorageNamespaceId;
299 view_params.swapped_out = false; 300 view_params.swapped_out = false;
300 view_params.replicated_frame_state = FrameReplicationState(); 301 view_params.replicated_frame_state = FrameReplicationState();
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); 662 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame());
662 frame->Navigate(common_params, StartNavigationParams(), request_params); 663 frame->Navigate(common_params, StartNavigationParams(), request_params);
663 664
664 // The load actually happens asynchronously, so we pump messages to process 665 // The load actually happens asynchronously, so we pump messages to process
665 // the pending continuation. 666 // the pending continuation.
666 FrameLoadWaiter(frame).Wait(); 667 FrameLoadWaiter(frame).Wait();
667 view_->GetWebView()->updateAllLifecyclePhases(); 668 view_->GetWebView()->updateAllLifecyclePhases();
668 } 669 }
669 670
670 } // namespace content 671 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/BUILD.gn ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698