| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 void WebKitTestController::OverrideWebkitPrefs(WebPreferences* prefs) { | 332 void WebKitTestController::OverrideWebkitPrefs(WebPreferences* prefs) { |
| 333 if (should_override_prefs_) { | 333 if (should_override_prefs_) { |
| 334 *prefs = prefs_; | 334 *prefs = prefs_; |
| 335 } else { | 335 } else { |
| 336 ApplyLayoutTestDefaultPreferences(prefs); | 336 ApplyLayoutTestDefaultPreferences(prefs); |
| 337 if (is_compositing_test_) { | 337 if (is_compositing_test_) { |
| 338 CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 338 CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 339 if (!command_line.HasSwitch(switches::kDisableGpu)) | 339 if (!command_line.HasSwitch(switches::kDisableGpu)) |
| 340 prefs->accelerated_2d_canvas_enabled = true; | 340 prefs->accelerated_2d_canvas_enabled = true; |
| 341 prefs->accelerated_compositing_for_video_enabled = true; | |
| 342 prefs->mock_scrollbars_enabled = true; | 341 prefs->mock_scrollbars_enabled = true; |
| 343 } | 342 } |
| 344 } | 343 } |
| 345 } | 344 } |
| 346 | 345 |
| 347 void WebKitTestController::OpenURL(const GURL& url) { | 346 void WebKitTestController::OpenURL(const GURL& url) { |
| 348 if (test_phase_ != DURING_TEST) | 347 if (test_phase_ != DURING_TEST) |
| 349 return; | 348 return; |
| 350 | 349 |
| 351 Shell::CreateNewWindow(main_window_->web_contents()->GetBrowserContext(), | 350 Shell::CreateNewWindow(main_window_->web_contents()->GetBrowserContext(), |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 | 687 |
| 689 printer_->AddErrorMessage( | 688 printer_->AddErrorMessage( |
| 690 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, | 689 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, |
| 691 result.detail.c_str())); | 690 result.detail.c_str())); |
| 692 CHECK(!crash_when_leak_found_); | 691 CHECK(!crash_when_leak_found_); |
| 693 | 692 |
| 694 DiscardMainWindow(); | 693 DiscardMainWindow(); |
| 695 } | 694 } |
| 696 | 695 |
| 697 } // namespace content | 696 } // namespace content |
| OLD | NEW |