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

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

Issue 6685012: Give prerendering RVH's RenderWidgetHostViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Sync to trunk Created 9 years, 8 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 | chrome/browser/prerender/prerender_contents.h » ('j') | 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) 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>
6
5 #include "base/command_line.h" 7 #include "base/command_line.h"
6 #include "base/path_service.h" 8 #include "base/path_service.h"
7 #include "base/string_util.h" 9 #include "base/string_util.h"
8 #include "chrome/browser/prerender/prerender_contents.h" 10 #include "chrome/browser/prerender/prerender_contents.h"
9 #include "chrome/browser/prerender/prerender_manager.h" 11 #include "chrome/browser/prerender/prerender_manager.h"
10 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/task_manager/task_manager.h" 13 #include "chrome/browser/task_manager/task_manager.h"
12 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_window.h" 15 #include "chrome/browser/ui/browser_window.h"
14 #include "chrome/common/chrome_paths.h" 16 #include "chrome/common/chrome_paths.h"
15 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
16 #include "chrome/test/in_process_browser_test.h" 18 #include "chrome/test/in_process_browser_test.h"
17 #include "chrome/test/ui_test_utils.h" 19 #include "chrome/test/ui_test_utils.h"
18 #include "content/browser/tab_contents/tab_contents.h" 20 #include "content/browser/tab_contents/tab_contents.h"
19 #include "grit/generated_resources.h" 21 #include "grit/generated_resources.h"
20 #include "net/url_request/url_request_context.h" 22 #include "net/url_request/url_request_context.h"
21 #include "net/url_request/url_request_context_getter.h" 23 #include "net/url_request/url_request_context_getter.h"
22 #include "ui/base/l10n/l10n_util.h" 24 #include "ui/base/l10n/l10n_util.h"
23 25
24 #include <deque>
25
26 // Prerender tests work as follows: 26 // Prerender tests work as follows:
27 // 27 //
28 // A page with a prefetch link to the test page is loaded. Once prerendered, 28 // A page with a prefetch link to the test page is loaded. Once prerendered,
29 // its Javascript function DidPrerenderPass() is called, which returns true if 29 // its Javascript function DidPrerenderPass() is called, which returns true if
30 // the page behaves as expected when prerendered. 30 // the page behaves as expected when prerendered.
31 // 31 //
32 // The prerendered page is then displayed on a tab. The Javascript function 32 // The prerendered page is then displayed on a tab. The Javascript function
33 // DidDisplayPass() is called, and returns true if the page behaved as it 33 // DidDisplayPass() is called, and returns true if the page behaved as it
34 // should while being displayed. 34 // should while being displayed.
35 35
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 } 655 }
656 656
657 // Checks that prerenderers will terminate when a video tag is inserted via 657 // Checks that prerenderers will terminate when a video tag is inserted via
658 // javascript. 658 // javascript.
659 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderHTML5VideoJs) { 659 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderHTML5VideoJs) {
660 PrerenderTestURL("files/prerender/prerender_html5_video_script.html", 660 PrerenderTestURL("files/prerender/prerender_html5_video_script.html",
661 FINAL_STATUS_HTML5_MEDIA, 661 FINAL_STATUS_HTML5_MEDIA,
662 1); 662 1);
663 } 663 }
664 664
665 // Checks that scripts can retrieve the correct window size while prerendering.
666 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderWindowSize) {
667 PrerenderTestURL("files/prerender/prerender_size.html",
668 FINAL_STATUS_USED,
669 1);
670 NavigateToDestURL();
671 }
672
665 } // namespace prerender 673 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698