| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 delegate_->RevokeDragDrop(); | 162 delegate_->RevokeDragDrop(); |
| 163 | 163 |
| 164 // DevTools frontend page is supposed to be navigated only once and | 164 // DevTools frontend page is supposed to be navigated only once and |
| 165 // loading another URL in that Page is an error. | 165 // loading another URL in that Page is an error. |
| 166 if (!dev_tools_client_.get()) { | 166 if (!dev_tools_client_.get()) { |
| 167 // Navigate to an empty page to fire all the destruction logic for the | 167 // Navigate to an empty page to fire all the destruction logic for the |
| 168 // current page. | 168 // current page. |
| 169 LoadURL(GURL("about:blank")); | 169 LoadURL(GURL("about:blank")); |
| 170 } | 170 } |
| 171 | 171 |
| 172 net::URLRequestFilter* filter = net::URLRequestFilter::GetInstance(); |
| 173 filter->RemoveHostnameHandler("test-shell-resource", "inspector"); |
| 174 |
| 172 // Call GC twice to clean up garbage. | 175 // Call GC twice to clean up garbage. |
| 173 CallJSGC(); | 176 CallJSGC(); |
| 174 CallJSGC(); | 177 CallJSGC(); |
| 175 | 178 |
| 176 // Destroy the WebView before the TestWebViewDelegate. | 179 // Destroy the WebView before the TestWebViewDelegate. |
| 177 m_webViewHost.reset(); | 180 m_webViewHost.reset(); |
| 178 | 181 |
| 179 CloseDevTools(); | 182 CloseDevTools(); |
| 180 | 183 |
| 181 PlatformCleanUp(); | 184 PlatformCleanUp(); |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 return device_orientation_client_mock_.get(); | 620 return device_orientation_client_mock_.get(); |
| 618 } | 621 } |
| 619 | 622 |
| 620 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { | 623 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { |
| 621 if (!geolocation_client_mock_.get()) { | 624 if (!geolocation_client_mock_.get()) { |
| 622 geolocation_client_mock_.reset( | 625 geolocation_client_mock_.reset( |
| 623 WebKit::WebGeolocationClientMock::create()); | 626 WebKit::WebGeolocationClientMock::create()); |
| 624 } | 627 } |
| 625 return geolocation_client_mock_.get(); | 628 return geolocation_client_mock_.get(); |
| 626 } | 629 } |
| OLD | NEW |