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

Side by Side Diff: chrome/test/base/browser_with_test_window_test.cc

Issue 8873032: Removing MessageLoop::QuitTask() from chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert 3 more problematic files Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/service/service_process.cc ('k') | chrome/test/base/ui_test_utils.cc » ('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 "chrome/test/base/browser_with_test_window_test.h" 5 #include "chrome/test/base/browser_with_test_window_test.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <ole2.h> 8 #include <ole2.h>
9 #endif // defined(OS_WIN) 9 #endif // defined(OS_WIN)
10 10
(...skipping 27 matching lines...) Expand all
38 window_.reset(new TestBrowserWindow(browser())); 38 window_.reset(new TestBrowserWindow(browser()));
39 browser_->set_window(window_.get()); 39 browser_->set_window(window_.get());
40 } 40 }
41 41
42 BrowserWithTestWindowTest::~BrowserWithTestWindowTest() { 42 BrowserWithTestWindowTest::~BrowserWithTestWindowTest() {
43 // A Task is leaked if we don't destroy everything, then run the message 43 // A Task is leaked if we don't destroy everything, then run the message
44 // loop. 44 // loop.
45 DestroyBrowser(); 45 DestroyBrowser();
46 profile_.reset(NULL); 46 profile_.reset(NULL);
47 47
48 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask); 48 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
49 MessageLoop::current()->Run(); 49 MessageLoop::current()->Run();
50 50
51 #if defined(OS_WIN) 51 #if defined(OS_WIN)
52 OleUninitialize(); 52 OleUninitialize();
53 #endif 53 #endif
54 } 54 }
55 55
56 TestRenderViewHost* BrowserWithTestWindowTest::TestRenderViewHostForTab( 56 TestRenderViewHost* BrowserWithTestWindowTest::TestRenderViewHostForTab(
57 TabContents* tab_contents) { 57 TabContents* tab_contents) {
58 return static_cast<TestRenderViewHost*>( 58 return static_cast<TestRenderViewHost*>(
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Make sure we close all tabs, otherwise Browser isn't happy in its 130 // Make sure we close all tabs, otherwise Browser isn't happy in its
131 // destructor. 131 // destructor.
132 browser()->CloseAllTabs(); 132 browser()->CloseAllTabs();
133 browser_.reset(NULL); 133 browser_.reset(NULL);
134 window_.reset(NULL); 134 window_.reset(NULL);
135 } 135 }
136 136
137 TestingProfile* BrowserWithTestWindowTest::CreateProfile() { 137 TestingProfile* BrowserWithTestWindowTest::CreateProfile() {
138 return new TestingProfile(); 138 return new TestingProfile();
139 } 139 }
OLDNEW
« no previous file with comments | « chrome/service/service_process.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698