Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 22481006: Disable PrerenderBrowserTest.PrerenderClearCache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <vector> 6 #include <vector>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after
2476 base::Bind(&ClearBrowsingData, current_browser(), 2476 base::Bind(&ClearBrowsingData, current_browser(),
2477 BrowsingDataRemover::REMOVE_HISTORY)); 2477 BrowsingDataRemover::REMOVE_HISTORY));
2478 content::RunMessageLoop(); 2478 content::RunMessageLoop();
2479 2479
2480 // Make sure prerender history was cleared. 2480 // Make sure prerender history was cleared.
2481 EXPECT_EQ(0, GetHistoryLength()); 2481 EXPECT_EQ(0, GetHistoryLength());
2482 } 2482 }
2483 2483
2484 // Checks that when the cache is cleared, prerenders are cancelled but 2484 // Checks that when the cache is cleared, prerenders are cancelled but
2485 // prerendering history is not cleared. 2485 // prerendering history is not cleared.
2486 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderClearCache) { 2486 // Flaky/times out on linux_aura, win, mac - http://crbug.com/270948
2487 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, DISABLED_PrerenderClearCache) {
2487 PrerenderTestURL("files/prerender/prerender_page.html", 2488 PrerenderTestURL("files/prerender/prerender_page.html",
2488 FINAL_STATUS_CACHE_OR_HISTORY_CLEARED, 2489 FINAL_STATUS_CACHE_OR_HISTORY_CLEARED,
2489 1); 2490 1);
2490 2491
2491 // Post a task to clear the cache, and run the message loop until it 2492 // Post a task to clear the cache, and run the message loop until it
2492 // destroys the prerender. 2493 // destroys the prerender.
2493 base::MessageLoop::current()->PostTask(FROM_HERE, 2494 base::MessageLoop::current()->PostTask(FROM_HERE,
2494 base::Bind(&ClearBrowsingData, current_browser(), 2495 base::Bind(&ClearBrowsingData, current_browser(),
2495 BrowsingDataRemover::REMOVE_CACHE)); 2496 BrowsingDataRemover::REMOVE_CACHE));
2496 content::RunMessageLoop(); 2497 content::RunMessageLoop();
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 PrerenderTestURL("files/prerender/prerender_page.html", 2946 PrerenderTestURL("files/prerender/prerender_page.html",
2946 FINAL_STATUS_PAGE_BEING_CAPTURED, 1); 2947 FINAL_STATUS_PAGE_BEING_CAPTURED, 1);
2947 WebContents* web_contents = 2948 WebContents* web_contents =
2948 current_browser()->tab_strip_model()->GetActiveWebContents(); 2949 current_browser()->tab_strip_model()->GetActiveWebContents();
2949 web_contents->IncrementCapturerCount(); 2950 web_contents->IncrementCapturerCount();
2950 NavigateToDestURLWithDisposition(CURRENT_TAB, false); 2951 NavigateToDestURLWithDisposition(CURRENT_TAB, false);
2951 web_contents->DecrementCapturerCount(); 2952 web_contents->DecrementCapturerCount();
2952 } 2953 }
2953 2954
2954 } // namespace prerender 2955 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698