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

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

Issue 10778044: Always enable dom automation for browser_tests. This avoids developers having to call EnableDOMAuto… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
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 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 class PrerenderBrowserTest : virtual public InProcessBrowserTest { 504 class PrerenderBrowserTest : virtual public InProcessBrowserTest {
505 public: 505 public:
506 PrerenderBrowserTest() 506 PrerenderBrowserTest()
507 : prerender_contents_factory_(NULL), 507 : prerender_contents_factory_(NULL),
508 #if defined(ENABLE_SAFE_BROWSING) 508 #if defined(ENABLE_SAFE_BROWSING)
509 safe_browsing_factory_(new TestSafeBrowsingServiceFactory()), 509 safe_browsing_factory_(new TestSafeBrowsingServiceFactory()),
510 #endif 510 #endif
511 use_https_src_server_(false), 511 use_https_src_server_(false),
512 call_javascript_(true), 512 call_javascript_(true),
513 loader_path_("files/prerender/prerender_loader.html"), 513 loader_path_("files/prerender/prerender_loader.html"),
514 explicitly_set_browser_(NULL) { 514 explicitly_set_browser_(NULL) {}
515 EnableDOMAutomation();
516 }
517 515
518 virtual ~PrerenderBrowserTest() {} 516 virtual ~PrerenderBrowserTest() {}
519 517
520 content::SessionStorageNamespace* GetSessionStorageNamespace() const { 518 content::SessionStorageNamespace* GetSessionStorageNamespace() const {
521 TabContents* tab_contents = 519 TabContents* tab_contents =
522 current_browser()->tab_strip_model()->GetActiveTabContents(); 520 current_browser()->tab_strip_model()->GetActiveTabContents();
523 if (!tab_contents) 521 if (!tab_contents)
524 return NULL; 522 return NULL;
525 return tab_contents->web_contents()->GetRenderViewHost()-> 523 return tab_contents->web_contents()->GetRenderViewHost()->
526 GetSessionStorageNamespace(); 524 GetSessionStorageNamespace();
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 ResultCatcher catcher; 2366 ResultCatcher catcher;
2369 2367
2370 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); 2368 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1);
2371 NavigateToDestURL(); 2369 NavigateToDestURL();
2372 ASSERT_TRUE(IsEmptyPrerenderLinkManager()); 2370 ASSERT_TRUE(IsEmptyPrerenderLinkManager());
2373 2371
2374 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); 2372 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
2375 } 2373 }
2376 2374
2377 } // namespace prerender 2375 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prefetch_browsertest.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698