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

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

Issue 2558143002: Remove the enable_task_manager build flag and define. (Closed)
Patch Set: Includes Created 4 years 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
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 <stddef.h> 5 #include <stddef.h>
6 #include <deque> 6 #include <deque>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <utility> 10 #include <utility>
(...skipping 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after
1757 EXPECT_FALSE(UrlIsInPrerenderManager(kHtmlFileB)); 1757 EXPECT_FALSE(UrlIsInPrerenderManager(kHtmlFileB));
1758 1758
1759 // Cancel the prerender. 1759 // Cancel the prerender.
1760 GetPrerenderManager()->CancelAllPrerenders(); 1760 GetPrerenderManager()->CancelAllPrerenders();
1761 prerender->WaitForStop(); 1761 prerender->WaitForStop();
1762 1762
1763 // All prerenders are now gone. 1763 // All prerenders are now gone.
1764 EXPECT_TRUE(IsEmptyPrerenderLinkManager()); 1764 EXPECT_TRUE(IsEmptyPrerenderLinkManager());
1765 } 1765 }
1766 1766
1767 #if defined(ENABLE_TASK_MANAGER) 1767 #if !defined(OS_ANDROID)
1768 1768
1769 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, OpenTaskManagerBeforePrerender) { 1769 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, OpenTaskManagerBeforePrerender) {
1770 const base::string16 any_prerender = MatchTaskManagerPrerender("*"); 1770 const base::string16 any_prerender = MatchTaskManagerPrerender("*");
1771 const base::string16 any_tab = MatchTaskManagerTab("*"); 1771 const base::string16 any_tab = MatchTaskManagerTab("*");
1772 const base::string16 original = MatchTaskManagerTab("Preloader"); 1772 const base::string16 original = MatchTaskManagerTab("Preloader");
1773 const base::string16 prerender = MatchTaskManagerPrerender("Prerender Page"); 1773 const base::string16 prerender = MatchTaskManagerPrerender("Prerender Page");
1774 const base::string16 final = MatchTaskManagerTab("Prerender Page"); 1774 const base::string16 final = MatchTaskManagerTab("Prerender Page");
1775 1775
1776 // Show the task manager. This populates the model. 1776 // Show the task manager. This populates the model.
1777 chrome::OpenTaskManager(current_browser()); 1777 chrome::OpenTaskManager(current_browser());
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1848 // this after the prerender has been swapped in. 1848 // this after the prerender has been swapped in.
1849 chrome::OpenTaskManager(current_browser()); 1849 chrome::OpenTaskManager(current_browser());
1850 1850
1851 // We should not see a prerender resource in the task manager, just a normal 1851 // We should not see a prerender resource in the task manager, just a normal
1852 // page. 1852 // page.
1853 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, final)); 1853 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, final));
1854 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, any_tab)); 1854 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, any_tab));
1855 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, any_prerender)); 1855 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, any_prerender));
1856 } 1856 }
1857 1857
1858 #endif // defined(ENABLE_TASK_MANAGER) 1858 #endif // !defined(OS_ANDROID)
1859 1859
1860 // Checks that audio loads are deferred on prerendering. 1860 // Checks that audio loads are deferred on prerendering.
1861 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderHTML5Audio) { 1861 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderHTML5Audio) {
1862 PrerenderTestURL("/prerender/prerender_html5_audio.html", FINAL_STATUS_USED, 1862 PrerenderTestURL("/prerender/prerender_html5_audio.html", FINAL_STATUS_USED,
1863 1); 1863 1);
1864 NavigateToDestURL(); 1864 NavigateToDestURL();
1865 WaitForASCIITitle(GetActiveWebContents(), kPassTitle); 1865 WaitForASCIITitle(GetActiveWebContents(), kPassTitle);
1866 } 1866 }
1867 1867
1868 // Checks that audio loads are deferred on prerendering and played back when 1868 // Checks that audio loads are deferred on prerendering and played back when
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
3320 browser()->tab_strip_model()->GetActiveWebContents(); 3320 browser()->tab_strip_model()->GetActiveWebContents();
3321 bool display_test_result = false; 3321 bool display_test_result = false;
3322 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, 3322 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents,
3323 "DidDisplayReallyPass()", 3323 "DidDisplayReallyPass()",
3324 &display_test_result)); 3324 &display_test_result));
3325 ASSERT_TRUE(display_test_result); 3325 ASSERT_TRUE(display_test_result);
3326 } 3326 }
3327 #endif // !defined(DISABLE_NACL) 3327 #endif // !defined(DISABLE_NACL)
3328 3328
3329 } // namespace prerender 3329 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/printing/print_preview_dialog_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698