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

Side by Side Diff: content/test/content_browser_test.cc

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 | « content/shell/webkit_test_controller.cc ('k') | content/test/content_test_launcher.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 "content/test/content_browser_test.h" 5 #include "content/test/content_browser_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // executed (as opposed to executed inside a message loop) would autorelease 101 // executed (as opposed to executed inside a message loop) would autorelease
102 // objects into a higher-level pool. This pool is not recycled in-sync with 102 // objects into a higher-level pool. This pool is not recycled in-sync with
103 // the message loops' pools and causes problems with code relying on 103 // the message loops' pools and causes problems with code relying on
104 // deallocation via an autorelease pool (such as browser window closure and 104 // deallocation via an autorelease pool (such as browser window closure and
105 // browser shutdown). To avoid this, the following pool is recycled after each 105 // browser shutdown). To avoid this, the following pool is recycled after each
106 // time code is directly executed. 106 // time code is directly executed.
107 base::mac::ScopedNSAutoreleasePool pool; 107 base::mac::ScopedNSAutoreleasePool pool;
108 #endif 108 #endif
109 109
110 // Pump startup related events. 110 // Pump startup related events.
111 MessageLoopForUI::current()->RunUntilIdle(); 111 base::MessageLoopForUI::current()->RunUntilIdle();
112 112
113 #if defined(OS_MACOSX) 113 #if defined(OS_MACOSX)
114 pool.Recycle(); 114 pool.Recycle();
115 #endif 115 #endif
116 116
117 SetUpOnMainThread(); 117 SetUpOnMainThread();
118 118
119 RunTestOnMainThread(); 119 RunTestOnMainThread();
120 #if defined(OS_MACOSX) 120 #if defined(OS_MACOSX)
121 pool.Recycle(); 121 pool.Recycle();
(...skipping 19 matching lines...) Expand all
141 Shell* ContentBrowserTest::CreateOffTheRecordBrowser() { 141 Shell* ContentBrowserTest::CreateOffTheRecordBrowser() {
142 return Shell::CreateNewWindow( 142 return Shell::CreateNewWindow(
143 ShellContentBrowserClient::Get()->off_the_record_browser_context(), 143 ShellContentBrowserClient::Get()->off_the_record_browser_context(),
144 GURL(chrome::kAboutBlankURL), 144 GURL(chrome::kAboutBlankURL),
145 NULL, 145 NULL,
146 MSG_ROUTING_NONE, 146 MSG_ROUTING_NONE,
147 gfx::Size()); 147 gfx::Size());
148 } 148 }
149 149
150 } // namespace content 150 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/webkit_test_controller.cc ('k') | content/test/content_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698