OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shell/browser/webkit_test_controller.h" | 5 #include "content/shell/browser/webkit_test_controller.h" |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 browser_context, | 248 browser_context, |
249 GURL(), | 249 GURL(), |
250 NULL, | 250 NULL, |
251 MSG_ROUTING_NONE, | 251 MSG_ROUTING_NONE, |
252 initial_size_); | 252 initial_size_); |
253 WebContentsObserver::Observe(main_window_->web_contents()); | 253 WebContentsObserver::Observe(main_window_->web_contents()); |
254 send_configuration_to_next_host_ = true; | 254 send_configuration_to_next_host_ = true; |
255 current_pid_ = base::kNullProcessId; | 255 current_pid_ = base::kNullProcessId; |
256 main_window_->LoadURL(test_url); | 256 main_window_->LoadURL(test_url); |
257 } else { | 257 } else { |
258 #if (defined(OS_WIN) && !defined(USE_AURA)) || \ | 258 #if defined(TOOLKIT_GTK) || defined(OS_MACOSX) |
259 defined(TOOLKIT_GTK) || defined(OS_MACOSX) | |
260 // Shell::SizeTo is not implemented on all platforms. | 259 // Shell::SizeTo is not implemented on all platforms. |
261 main_window_->SizeTo(initial_size_); | 260 main_window_->SizeTo(initial_size_); |
262 #endif | 261 #endif |
263 main_window_->web_contents()->GetRenderViewHost()->GetView() | 262 main_window_->web_contents()->GetRenderViewHost()->GetView() |
264 ->SetSize(initial_size_); | 263 ->SetSize(initial_size_); |
265 main_window_->web_contents()->GetRenderViewHost()->WasResized(); | 264 main_window_->web_contents()->GetRenderViewHost()->WasResized(); |
266 RenderViewHost* render_view_host = | 265 RenderViewHost* render_view_host = |
267 main_window_->web_contents()->GetRenderViewHost(); | 266 main_window_->web_contents()->GetRenderViewHost(); |
268 WebPreferences prefs = render_view_host->GetWebkitPreferences(); | 267 WebPreferences prefs = render_view_host->GetWebkitPreferences(); |
269 OverrideWebkitPrefs(&prefs); | 268 OverrideWebkitPrefs(&prefs); |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 } | 645 } |
647 base::MessageLoop::current()->RunUntilIdle(); | 646 base::MessageLoop::current()->RunUntilIdle(); |
648 } | 647 } |
649 | 648 |
650 void WebKitTestController::OnResetDone() { | 649 void WebKitTestController::OnResetDone() { |
651 base::MessageLoop::current()->PostTask(FROM_HERE, | 650 base::MessageLoop::current()->PostTask(FROM_HERE, |
652 base::MessageLoop::QuitClosure()); | 651 base::MessageLoop::QuitClosure()); |
653 } | 652 } |
654 | 653 |
655 } // namespace content | 654 } // namespace content |
OLD | NEW |