| 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 #include "content/shell/webkit_test_controller.h" | 5 #include "content/shell/webkit_test_controller.h" |
| 6 | 6 |
| 7 #include <iostream> | 7 #include <iostream> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 webkit_glue::WebPreferences* prefs) { | 288 webkit_glue::WebPreferences* prefs) { |
| 289 if (should_override_prefs_) { | 289 if (should_override_prefs_) { |
| 290 *prefs = prefs_; | 290 *prefs = prefs_; |
| 291 } else { | 291 } else { |
| 292 ApplyLayoutTestDefaultPreferences(prefs); | 292 ApplyLayoutTestDefaultPreferences(prefs); |
| 293 if (is_compositing_test_) { | 293 if (is_compositing_test_) { |
| 294 CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 294 CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 295 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing)) | 295 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing)) |
| 296 prefs->accelerated_2d_canvas_enabled = true; | 296 prefs->accelerated_2d_canvas_enabled = true; |
| 297 prefs->accelerated_compositing_for_video_enabled = true; | 297 prefs->accelerated_compositing_for_video_enabled = true; |
| 298 prefs->deferred_2d_canvas_enabled = true; | |
| 299 prefs->mock_scrollbars_enabled = true; | 298 prefs->mock_scrollbars_enabled = true; |
| 300 } | 299 } |
| 301 } | 300 } |
| 302 } | 301 } |
| 303 | 302 |
| 304 bool WebKitTestController::OnMessageReceived(const IPC::Message& message) { | 303 bool WebKitTestController::OnMessageReceived(const IPC::Message& message) { |
| 305 DCHECK(CalledOnValidThread()); | 304 DCHECK(CalledOnValidThread()); |
| 306 bool handled = true; | 305 bool handled = true; |
| 307 IPC_BEGIN_MESSAGE_MAP(WebKitTestController, message) | 306 IPC_BEGIN_MESSAGE_MAP(WebKitTestController, message) |
| 308 IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessage, OnPrintMessage) | 307 IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessage, OnPrintMessage) |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 open_windows[i]->Close(); | 593 open_windows[i]->Close(); |
| 595 } | 594 } |
| 596 MessageLoop::current()->RunUntilIdle(); | 595 MessageLoop::current()->RunUntilIdle(); |
| 597 } | 596 } |
| 598 | 597 |
| 599 void WebKitTestController::OnResetDone() { | 598 void WebKitTestController::OnResetDone() { |
| 600 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); | 599 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); |
| 601 } | 600 } |
| 602 | 601 |
| 603 } // namespace content | 602 } // namespace content |
| OLD | NEW |