Chromium Code Reviews| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 320 printer_->AddErrorMessage("#CRASHED - worker"); | 320 printer_->AddErrorMessage("#CRASHED - worker"); |
| 321 DiscardMainWindow(); | 321 DiscardMainWindow(); |
| 322 } | 322 } |
| 323 | 323 |
| 324 void WebKitTestController::OverrideWebkitPrefs(WebPreferences* prefs) { | 324 void WebKitTestController::OverrideWebkitPrefs(WebPreferences* prefs) { |
| 325 if (should_override_prefs_) { | 325 if (should_override_prefs_) { |
| 326 *prefs = prefs_; | 326 *prefs = prefs_; |
| 327 } else { | 327 } else { |
| 328 ApplyLayoutTestDefaultPreferences(prefs); | 328 ApplyLayoutTestDefaultPreferences(prefs); |
| 329 if (is_compositing_test_) { | 329 if (is_compositing_test_) { |
| 330 CommandLine& command_line = *CommandLine::ForCurrentProcess(); | |
| 331 if (!command_line.HasSwitch(switches::kEnableSoftwareCompositing)) | |
| 332 prefs->accelerated_2d_canvas_enabled = true; | |
|
piman
2014/04/11 20:30:46
I'm not sure that's right... this is used for layo
| |
| 333 prefs->accelerated_compositing_for_video_enabled = true; | 330 prefs->accelerated_compositing_for_video_enabled = true; |
| 334 prefs->mock_scrollbars_enabled = true; | 331 prefs->mock_scrollbars_enabled = true; |
| 335 } | 332 } |
| 336 } | 333 } |
| 337 } | 334 } |
| 338 | 335 |
| 339 void WebKitTestController::OpenURL(const GURL& url) { | 336 void WebKitTestController::OpenURL(const GURL& url) { |
| 340 if (test_phase_ != DURING_TEST) | 337 if (test_phase_ != DURING_TEST) |
| 341 return; | 338 return; |
| 342 | 339 |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 671 return; | 668 return; |
| 672 } | 669 } |
| 673 | 670 |
| 674 printer_->AddErrorMessage( | 671 printer_->AddErrorMessage( |
| 675 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, | 672 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, |
| 676 result.detail.c_str())); | 673 result.detail.c_str())); |
| 677 DiscardMainWindow(); | 674 DiscardMainWindow(); |
| 678 } | 675 } |
| 679 | 676 |
| 680 } // namespace content | 677 } // namespace content |
| OLD | NEW |