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 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2283 PrerenderManager::PRERENDER_MODE_EXPERIMENT_CONTROL_GROUP); | 2283 PrerenderManager::PRERENDER_MODE_EXPERIMENT_CONTROL_GROUP); |
2284 PrerenderTestURL("files/prerender/prerender_alert_before_onload.html", | 2284 PrerenderTestURL("files/prerender/prerender_alert_before_onload.html", |
2285 FINAL_STATUS_WOULD_HAVE_BEEN_USED, 0); | 2285 FINAL_STATUS_WOULD_HAVE_BEEN_USED, 0); |
2286 NavigateToDestURL(); | 2286 NavigateToDestURL(); |
2287 } | 2287 } |
2288 | 2288 |
2289 // Make sure that the MatchComplete dummy works in the normal case. Once | 2289 // Make sure that the MatchComplete dummy works in the normal case. Once |
2290 // a prerender is cancelled because of a script, a dummy must be created to | 2290 // a prerender is cancelled because of a script, a dummy must be created to |
2291 // account for the MatchComplete case, and it must have a final status of | 2291 // account for the MatchComplete case, and it must have a final status of |
2292 // FINAL_STATUS_WOULD_HAVE_BEEN_USED. | 2292 // FINAL_STATUS_WOULD_HAVE_BEEN_USED. |
2293 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, MatchCompleteDummy) { | 2293 #if defined(OS_MACOSX) |
| 2294 // http://crbug.com/142912 - Times out on Chrome Mac release builder |
| 2295 #define MAYBE_MatchCompleteDummy DISABLED_MatchCompleteDummy |
| 2296 #else |
| 2297 #define MAYBE_MatchCompleteDummy MatchCompleteDummy |
| 2298 #endif |
| 2299 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, MAYBE_MatchCompleteDummy) { |
2294 std::deque<FinalStatus> expected_final_status_queue; | 2300 std::deque<FinalStatus> expected_final_status_queue; |
2295 expected_final_status_queue.push_back(FINAL_STATUS_JAVASCRIPT_ALERT); | 2301 expected_final_status_queue.push_back(FINAL_STATUS_JAVASCRIPT_ALERT); |
2296 expected_final_status_queue.push_back(FINAL_STATUS_WOULD_HAVE_BEEN_USED); | 2302 expected_final_status_queue.push_back(FINAL_STATUS_WOULD_HAVE_BEEN_USED); |
2297 PrerenderTestURL("files/prerender/prerender_alert_before_onload.html", | 2303 PrerenderTestURL("files/prerender/prerender_alert_before_onload.html", |
2298 expected_final_status_queue, 1); | 2304 expected_final_status_queue, 1); |
2299 NavigateToDestURL(); | 2305 NavigateToDestURL(); |
2300 } | 2306 } |
2301 | 2307 |
2302 class PrerenderBrowserTestWithNaCl : public PrerenderBrowserTest { | 2308 class PrerenderBrowserTestWithNaCl : public PrerenderBrowserTest { |
2303 public: | 2309 public: |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2392 ResultCatcher catcher; | 2398 ResultCatcher catcher; |
2393 | 2399 |
2394 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); | 2400 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); |
2395 NavigateToDestURL(); | 2401 NavigateToDestURL(); |
2396 ASSERT_TRUE(IsEmptyPrerenderLinkManager()); | 2402 ASSERT_TRUE(IsEmptyPrerenderLinkManager()); |
2397 | 2403 |
2398 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 2404 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
2399 } | 2405 } |
2400 | 2406 |
2401 } // namespace prerender | 2407 } // namespace prerender |
OLD | NEW |