Chromium Code Reviews| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 quit_message_loop_on_destruction_( | 137 quit_message_loop_on_destruction_( |
| 138 expected_final_status != FINAL_STATUS_EVICTED && | 138 expected_final_status != FINAL_STATUS_EVICTED && |
| 139 expected_final_status != FINAL_STATUS_APP_TERMINATING && | 139 expected_final_status != FINAL_STATUS_APP_TERMINATING && |
| 140 expected_final_status != FINAL_STATUS_MATCH_COMPLETE_DUMMY), | 140 expected_final_status != FINAL_STATUS_MATCH_COMPLETE_DUMMY), |
| 141 expected_pending_prerenders_(0) { | 141 expected_pending_prerenders_(0) { |
| 142 if (expected_number_of_loads == 0) | 142 if (expected_number_of_loads == 0) |
| 143 MessageLoopForUI::current()->Quit(); | 143 MessageLoopForUI::current()->Quit(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 virtual ~TestPrerenderContents() { | 146 virtual ~TestPrerenderContents() { |
| 147 EXPECT_EQ(expected_final_status_, final_status()) << | 147 if (expected_final_status_ == FINAL_STATUS_MATCH_COMPLETE_DUMMY) { |
| 148 " when testing URL " << prerender_url().path() << | 148 EXPECT_EQ(mc_status(), MC_REPLACEMENT); |
|
dominich
2012/01/20 22:23:37
Can you add some output like the below case that h
tburkard
2012/01/20 23:23:00
I agree that in the other case, it's helpful, beca
| |
| 149 " (Expected: " << NameFromFinalStatus(expected_final_status_) << | 149 } else { |
| 150 ", Actual: " << NameFromFinalStatus(final_status()) << ")"; | 150 EXPECT_EQ(expected_final_status_, final_status()) << |
| 151 " when testing URL " << prerender_url().path() << | |
| 152 " (Expected: " << NameFromFinalStatus(expected_final_status_) << | |
| 153 ", Actual: " << NameFromFinalStatus(final_status()) << ")"; | |
| 154 } | |
| 151 // Prerendering RenderViewHosts should be hidden before the first | 155 // Prerendering RenderViewHosts should be hidden before the first |
| 152 // navigation, so this should be happen for every PrerenderContents for | 156 // navigation, so this should be happen for every PrerenderContents for |
| 153 // which a RenderViewHost is created, regardless of whether or not it's | 157 // which a RenderViewHost is created, regardless of whether or not it's |
| 154 // used. | 158 // used. |
| 155 if (new_render_view_host_) | 159 if (new_render_view_host_) |
| 156 EXPECT_TRUE(was_hidden_); | 160 EXPECT_TRUE(was_hidden_); |
| 157 | 161 |
| 158 // A used PrerenderContents will only be destroyed when we swap out | 162 // A used PrerenderContents will only be destroyed when we swap out |
| 159 // TabContents, at the end of a navigation caused by a call to | 163 // TabContents, at the end of a navigation caused by a call to |
| 160 // NavigateToURLImpl(). | 164 // NavigateToURLImpl(). |
| (...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1902 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, DISABLED_PrerenderSessionStorage) { | 1906 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, DISABLED_PrerenderSessionStorage) { |
| 1903 set_loader_path("files/prerender/prerender_loader_with_session_storage.html"); | 1907 set_loader_path("files/prerender/prerender_loader_with_session_storage.html"); |
| 1904 PrerenderTestURL(GetCrossDomainTestUrl("files/prerender/prerender_page.html"), | 1908 PrerenderTestURL(GetCrossDomainTestUrl("files/prerender/prerender_page.html"), |
| 1905 FINAL_STATUS_USED, | 1909 FINAL_STATUS_USED, |
| 1906 1); | 1910 1); |
| 1907 NavigateToDestURL(); | 1911 NavigateToDestURL(); |
| 1908 GoBackToPageBeforePrerender(browser()); | 1912 GoBackToPageBeforePrerender(browser()); |
| 1909 } | 1913 } |
| 1910 | 1914 |
| 1911 } // namespace prerender | 1915 } // namespace prerender |
| OLD | NEW |