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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(); | 330 CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
331 if (!command_line.HasSwitch(switches::kEnableSoftwareCompositing)) | 331 if (!command_line.HasSwitch(switches::kDisableGpu)) |
332 prefs->accelerated_2d_canvas_enabled = true; | 332 prefs->accelerated_2d_canvas_enabled = true; |
333 prefs->accelerated_compositing_for_video_enabled = true; | 333 prefs->accelerated_compositing_for_video_enabled = true; |
334 prefs->mock_scrollbars_enabled = true; | 334 prefs->mock_scrollbars_enabled = true; |
335 } | 335 } |
336 } | 336 } |
337 } | 337 } |
338 | 338 |
339 void WebKitTestController::OpenURL(const GURL& url) { | 339 void WebKitTestController::OpenURL(const GURL& url) { |
340 if (test_phase_ != DURING_TEST) | 340 if (test_phase_ != DURING_TEST) |
341 return; | 341 return; |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 return; | 671 return; |
672 } | 672 } |
673 | 673 |
674 printer_->AddErrorMessage( | 674 printer_->AddErrorMessage( |
675 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, | 675 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, |
676 result.detail.c_str())); | 676 result.detail.c_str())); |
677 DiscardMainWindow(); | 677 DiscardMainWindow(); |
678 } | 678 } |
679 | 679 |
680 } // namespace content | 680 } // namespace content |
OLD | NEW |