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

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

Issue 818803004: Fix GPU process crash in ChromecastShellBrowserTest.EmptyTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | chromecast/chromecast_tests.gypi » ('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 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/chromecast_browser_test.h" 5 #include "chromecast/browser/test/chromecast_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/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chromecast/browser/cast_browser_context.h" 10 #include "chromecast/browser/cast_browser_context.h"
(...skipping 27 matching lines...) Expand all
38 // Pump startup related events. 38 // Pump startup related events.
39 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 39 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
40 base::RunLoop().RunUntilIdle(); 40 base::RunLoop().RunUntilIdle();
41 41
42 SetUpOnMainThread(); 42 SetUpOnMainThread();
43 43
44 RunTestOnMainThread(); 44 RunTestOnMainThread();
45 45
46 TearDownOnMainThread(); 46 TearDownOnMainThread();
47 47
48 for (content::RenderProcessHost::iterator i(
49 content::RenderProcessHost::AllHostsIterator());
50 !i.IsAtEnd(); i.Advance()) {
51 i.GetCurrentValue()->FastShutdownIfPossible();
52 }
53
54 web_contents_.reset(); 48 web_contents_.reset();
55 window_.reset(); 49 window_.reset();
56 } 50 }
57 51
58 void ChromecastBrowserTest::NavigateToURL(content::WebContents* window, 52 void ChromecastBrowserTest::NavigateToURL(content::WebContents* window,
59 const GURL& url) { 53 const GURL& url) {
60 content::WaitForLoadStop(window); 54 content::WaitForLoadStop(window);
61 content::TestNavigationObserver same_tab_observer(window, 1); 55 content::TestNavigationObserver same_tab_observer(window, 1);
62 content::NavigationController::LoadURLParams params(url); 56 content::NavigationController::LoadURLParams params(url);
63 params.transition_type = ui::PageTransitionFromInt( 57 params.transition_type = ui::PageTransitionFromInt(
64 ui::PAGE_TRANSITION_TYPED | 58 ui::PAGE_TRANSITION_TYPED |
65 ui::PAGE_TRANSITION_FROM_ADDRESS_BAR); 59 ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
66 window->GetController().LoadURLWithParams(params); 60 window->GetController().LoadURLWithParams(params);
67 same_tab_observer.Wait(); 61 same_tab_observer.Wait();
68 } 62 }
69 63
70 content::WebContents* ChromecastBrowserTest::CreateBrowser() { 64 content::WebContents* ChromecastBrowserTest::CreateBrowser() {
71 window_.reset(new CastContentWindow); 65 window_.reset(new CastContentWindow);
72 gfx::Size initial_size(1280, 720); 66 gfx::Size initial_size(1280, 720);
73 67
74 web_contents_ = window_->CreateWebContents( 68 web_contents_ = window_->CreateWebContents(
75 initial_size, 69 initial_size,
76 CastBrowserProcess::GetInstance()->browser_context()); 70 CastBrowserProcess::GetInstance()->browser_context());
77 window_->CreateWindowTree(initial_size, web_contents_.get()); 71 window_->CreateWindowTree(initial_size, web_contents_.get());
78 return web_contents_.get(); 72 return web_contents_.get();
79 } 73 }
80 74
81 } // namespace shell 75 } // namespace shell
82 } // namespace chromecast 76 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | chromecast/chromecast_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698