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 #undef LOG | 5 #undef LOG |
6 | 6 |
7 #include "webkit/tools/test_shell/test_shell.h" | 7 #include "webkit/tools/test_shell/test_shell.h" |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 result->append(ASCIIToUTF16( | 426 result->append(ASCIIToUTF16( |
427 "===============================================\n")); | 427 "===============================================\n")); |
428 } | 428 } |
429 | 429 |
430 void TestShell::CallJSGC() { | 430 void TestShell::CallJSGC() { |
431 webView()->mainFrame()->collectGarbage(); | 431 webView()->mainFrame()->collectGarbage(); |
432 } | 432 } |
433 | 433 |
434 WebView* TestShell::CreateWebView() { | 434 WebView* TestShell::CreateWebView() { |
435 // If we're running layout tests, only open a new window if the test has | 435 // If we're running layout tests, only open a new window if the test has |
436 // called layoutTestController.setCanOpenWindows() | 436 // called testRunner.setCanOpenWindows() |
437 if (layout_test_mode_) | 437 if (layout_test_mode_) |
438 return NULL; | 438 return NULL; |
439 | 439 |
440 TestShell* new_win; | 440 TestShell* new_win; |
441 if (!CreateNewWindow(GURL(), &new_win)) | 441 if (!CreateNewWindow(GURL(), &new_win)) |
442 return NULL; | 442 return NULL; |
443 | 443 |
444 return new_win->webView(); | 444 return new_win->webView(); |
445 } | 445 } |
446 | 446 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 return device_orientation_client_mock_.get(); | 606 return device_orientation_client_mock_.get(); |
607 } | 607 } |
608 | 608 |
609 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { | 609 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { |
610 if (!geolocation_client_mock_.get()) { | 610 if (!geolocation_client_mock_.get()) { |
611 geolocation_client_mock_.reset( | 611 geolocation_client_mock_.reset( |
612 WebKit::WebGeolocationClientMock::create()); | 612 WebKit::WebGeolocationClientMock::create()); |
613 } | 613 } |
614 return geolocation_client_mock_.get(); | 614 return geolocation_client_mock_.get(); |
615 } | 615 } |
OLD | NEW |