| 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 #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/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "ui/base/l10n/l10n_util.h" | 46 #include "ui/base/l10n/l10n_util.h" |
| 47 | 47 |
| 48 using content::BrowserThread; | 48 using content::BrowserThread; |
| 49 using content::DevToolsAgentHost; | 49 using content::DevToolsAgentHost; |
| 50 using content::DevToolsAgentHostRegistry; | 50 using content::DevToolsAgentHostRegistry; |
| 51 using content::DevToolsClientHost; | 51 using content::DevToolsClientHost; |
| 52 using content::DevToolsManager; | 52 using content::DevToolsManager; |
| 53 using content::NavigationController; | 53 using content::NavigationController; |
| 54 using content::OpenURLParams; | 54 using content::OpenURLParams; |
| 55 using content::Referrer; | 55 using content::Referrer; |
| 56 using content::RenderViewHost; |
| 57 using content::RenderWidgetHost; |
| 56 using content::WebContents; | 58 using content::WebContents; |
| 57 | 59 |
| 58 // Prerender tests work as follows: | 60 // Prerender tests work as follows: |
| 59 // | 61 // |
| 60 // A page with a prefetch link to the test page is loaded. Once prerendered, | 62 // A page with a prefetch link to the test page is loaded. Once prerendered, |
| 61 // its Javascript function DidPrerenderPass() is called, which returns true if | 63 // its Javascript function DidPrerenderPass() is called, which returns true if |
| 62 // the page behaves as expected when prerendered. | 64 // the page behaves as expected when prerendered. |
| 63 // | 65 // |
| 64 // The prerendered page is then displayed on a tab. The Javascript function | 66 // The prerendered page is then displayed on a tab. The Javascript function |
| 65 // DidDisplayPass() is called, and returns true if the page behaved as it | 67 // DidDisplayPass() is called, and returns true if the page behaved as it |
| (...skipping 1880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, MatchCompleteDummy) { | 1948 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, MatchCompleteDummy) { |
| 1947 std::deque<FinalStatus> expected_final_status_queue; | 1949 std::deque<FinalStatus> expected_final_status_queue; |
| 1948 expected_final_status_queue.push_back(FINAL_STATUS_JAVASCRIPT_ALERT); | 1950 expected_final_status_queue.push_back(FINAL_STATUS_JAVASCRIPT_ALERT); |
| 1949 expected_final_status_queue.push_back(FINAL_STATUS_WOULD_HAVE_BEEN_USED); | 1951 expected_final_status_queue.push_back(FINAL_STATUS_WOULD_HAVE_BEEN_USED); |
| 1950 PrerenderTestURL("files/prerender/prerender_alert_before_onload.html", | 1952 PrerenderTestURL("files/prerender/prerender_alert_before_onload.html", |
| 1951 expected_final_status_queue, 1); | 1953 expected_final_status_queue, 1); |
| 1952 NavigateToDestURL(); | 1954 NavigateToDestURL(); |
| 1953 } | 1955 } |
| 1954 | 1956 |
| 1955 } // namespace prerender | 1957 } // namespace prerender |
| OLD | NEW |