OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <deque> | 5 #include <deque> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "chrome/common/chrome_paths.h" | 30 #include "chrome/common/chrome_paths.h" |
31 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
32 #include "chrome/common/pref_names.h" | 32 #include "chrome/common/pref_names.h" |
33 #include "chrome/test/base/in_process_browser_test.h" | 33 #include "chrome/test/base/in_process_browser_test.h" |
34 #include "chrome/test/base/ui_test_utils.h" | 34 #include "chrome/test/base/ui_test_utils.h" |
35 #include "content/browser/debugger/devtools_client_host.h" | 35 #include "content/browser/debugger/devtools_client_host.h" |
36 #include "content/browser/debugger/devtools_manager.h" | 36 #include "content/browser/debugger/devtools_manager.h" |
37 #include "content/browser/renderer_host/render_view_host.h" | 37 #include "content/browser/renderer_host/render_view_host.h" |
38 #include "content/browser/tab_contents/tab_contents.h" | 38 #include "content/browser/tab_contents/tab_contents.h" |
39 #include "content/common/notification_service.h" | 39 #include "content/common/notification_service.h" |
40 #include "content/common/url_constants.h" | 40 #include "content/public/common/url_constants.h" |
41 #include "grit/generated_resources.h" | 41 #include "grit/generated_resources.h" |
42 #include "net/base/mock_host_resolver.h" | 42 #include "net/base/mock_host_resolver.h" |
43 #include "net/url_request/url_request_context.h" | 43 #include "net/url_request/url_request_context.h" |
44 #include "net/url_request/url_request_context_getter.h" | 44 #include "net/url_request/url_request_context_getter.h" |
45 #include "ui/base/l10n/l10n_util.h" | 45 #include "ui/base/l10n/l10n_util.h" |
46 | 46 |
47 // Prerender tests work as follows: | 47 // Prerender tests work as follows: |
48 // | 48 // |
49 // A page with a prefetch link to the test page is loaded. Once prerendered, | 49 // A page with a prefetch link to the test page is loaded. Once prerendered, |
50 // its Javascript function DidPrerenderPass() is called, which returns true if | 50 // its Javascript function DidPrerenderPass() is called, which returns true if |
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1898 RenderViewHost* inspected_rvh = tab_contents->render_view_host(); | 1898 RenderViewHost* inspected_rvh = tab_contents->render_view_host(); |
1899 DevToolsManager* manager = DevToolsManager::GetInstance(); | 1899 DevToolsManager* manager = DevToolsManager::GetInstance(); |
1900 FakeDevToolsClientHost client_host; | 1900 FakeDevToolsClientHost client_host; |
1901 manager->RegisterDevToolsClientHostFor(inspected_rvh, &client_host); | 1901 manager->RegisterDevToolsClientHostFor(inspected_rvh, &client_host); |
1902 const char* url = "files/prerender/prerender_page.html"; | 1902 const char* url = "files/prerender/prerender_page.html"; |
1903 PrerenderTestURL(url, FINAL_STATUS_DEVTOOLS_ATTACHED, 1); | 1903 PrerenderTestURL(url, FINAL_STATUS_DEVTOOLS_ATTACHED, 1); |
1904 NavigateToURL(url); | 1904 NavigateToURL(url); |
1905 } | 1905 } |
1906 | 1906 |
1907 } // namespace prerender | 1907 } // namespace prerender |
OLD | NEW |