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

Side by Side Diff: chromecast/browser/test/cast_browser_test.cc

Issue 2643553002: [Chromecast] Reuse the Aura window manager across receiver apps. (Closed)
Patch Set: applied reviewer feedback Created 3 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/test/cast_browser_test.h" 5 #include "chromecast/browser/test/cast_browser_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 SetUpOnMainThread(); 57 SetUpOnMainThread();
58 RunTestOnMainThread(); 58 RunTestOnMainThread();
59 TearDownOnMainThread(); 59 TearDownOnMainThread();
60 } 60 }
61 61
62 content::WebContents* CastBrowserTest::NavigateToURL(const GURL& url) { 62 content::WebContents* CastBrowserTest::NavigateToURL(const GURL& url) {
63 window_ = CastContentWindow::Create(this); 63 window_ = CastContentWindow::Create(this);
64 64
65 web_contents_ = window_->CreateWebContents( 65 web_contents_ = window_->CreateWebContents(
66 CastBrowserProcess::GetInstance()->browser_context()); 66 CastBrowserProcess::GetInstance()->browser_context());
67 window_->ShowWebContents(web_contents_.get());
68 content::WaitForLoadStop(web_contents_.get()); 67 content::WaitForLoadStop(web_contents_.get());
69 68
70 content::TestNavigationObserver same_tab_observer(web_contents_.get(), 1); 69 content::TestNavigationObserver same_tab_observer(web_contents_.get(), 1);
71 content::NavigationController::LoadURLParams params(url); 70 content::NavigationController::LoadURLParams params(url);
72 params.transition_type = ui::PageTransitionFromInt( 71 params.transition_type = ui::PageTransitionFromInt(
73 ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR); 72 ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
74 web_contents_->GetController().LoadURLWithParams(params); 73 web_contents_->GetController().LoadURLWithParams(params);
75 same_tab_observer.Wait(); 74 same_tab_observer.Wait();
76 75
77 return web_contents_.get(); 76 return web_contents_.get();
78 } 77 }
79 78
80 void CastBrowserTest::OnWindowDestroyed() {} 79 void CastBrowserTest::OnWindowDestroyed() {}
81 80
82 void CastBrowserTest::OnKeyEvent(const ui::KeyEvent& key_event) {} 81 void CastBrowserTest::OnKeyEvent(const ui::KeyEvent& key_event) {}
83 82
84 } // namespace shell 83 } // namespace shell
85 } // namespace chromecast 84 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698