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 26 matching lines...) Expand all Loading... |
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/public/browser/notification_service.h" | 39 #include "content/public/browser/notification_service.h" |
40 #include "content/public/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 using content::BrowserThread; |
| 48 |
47 // Prerender tests work as follows: | 49 // Prerender tests work as follows: |
48 // | 50 // |
49 // A page with a prefetch link to the test page is loaded. Once prerendered, | 51 // 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 | 52 // its Javascript function DidPrerenderPass() is called, which returns true if |
51 // the page behaves as expected when prerendered. | 53 // the page behaves as expected when prerendered. |
52 // | 54 // |
53 // The prerendered page is then displayed on a tab. The Javascript function | 55 // The prerendered page is then displayed on a tab. The Javascript function |
54 // DidDisplayPass() is called, and returns true if the page behaved as it | 56 // DidDisplayPass() is called, and returns true if the page behaved as it |
55 // should while being displayed. | 57 // should while being displayed. |
56 | 58 |
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1914 RenderViewHost* inspected_rvh = tab_contents->render_view_host(); | 1916 RenderViewHost* inspected_rvh = tab_contents->render_view_host(); |
1915 DevToolsManager* manager = DevToolsManager::GetInstance(); | 1917 DevToolsManager* manager = DevToolsManager::GetInstance(); |
1916 FakeDevToolsClientHost client_host; | 1918 FakeDevToolsClientHost client_host; |
1917 manager->RegisterDevToolsClientHostFor(inspected_rvh, &client_host); | 1919 manager->RegisterDevToolsClientHostFor(inspected_rvh, &client_host); |
1918 const char* url = "files/prerender/prerender_page.html"; | 1920 const char* url = "files/prerender/prerender_page.html"; |
1919 PrerenderTestURL(url, FINAL_STATUS_DEVTOOLS_ATTACHED, 1); | 1921 PrerenderTestURL(url, FINAL_STATUS_DEVTOOLS_ATTACHED, 1); |
1920 NavigateToURL(url); | 1922 NavigateToURL(url); |
1921 } | 1923 } |
1922 | 1924 |
1923 } // namespace prerender | 1925 } // namespace prerender |
OLD | NEW |