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

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

Issue 12832004: content: Move all listeners of NOTIFICATION_RENDER_VIEW_HOST_CREATED out of content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 9 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 "chrome/test/base/in_process_browser_test.h" 5 #include "chrome/test/base/in_process_browser_test.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 DCHECK(!g_browser_process); 212 DCHECK(!g_browser_process);
213 BrowserTestBase::TearDown(); 213 BrowserTestBase::TearDown();
214 } 214 }
215 215
216 void InProcessBrowserTest::AddTabAtIndexToBrowser( 216 void InProcessBrowserTest::AddTabAtIndexToBrowser(
217 Browser* browser, 217 Browser* browser,
218 int index, 218 int index,
219 const GURL& url, 219 const GURL& url,
220 content::PageTransition transition) { 220 content::PageTransition transition) {
221 content::TestNavigationObserver observer( 221 content::TestNavigationObserver observer(
222 content::NotificationService::AllSources(), NULL, 1); 222 content::NotificationService::AllSources(), 1);
223 223
224 chrome::NavigateParams params(browser, url, transition); 224 chrome::NavigateParams params(browser, url, transition);
225 params.tabstrip_index = index; 225 params.tabstrip_index = index;
226 params.disposition = NEW_FOREGROUND_TAB; 226 params.disposition = NEW_FOREGROUND_TAB;
227 chrome::Navigate(&params); 227 chrome::Navigate(&params);
228 228
229 observer.Wait(); 229 observer.Wait();
230 } 230 }
231 231
232 void InProcessBrowserTest::AddTabAtIndex( 232 void InProcessBrowserTest::AddTabAtIndex(
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 // On the Mac, this eventually reaches 393 // On the Mac, this eventually reaches
394 // -[BrowserWindowController windowWillClose:], which will post a deferred 394 // -[BrowserWindowController windowWillClose:], which will post a deferred
395 // -autorelease on itself to ultimately destroy the Browser object. The line 395 // -autorelease on itself to ultimately destroy the Browser object. The line
396 // below is necessary to pump these pending messages to ensure all Browsers 396 // below is necessary to pump these pending messages to ensure all Browsers
397 // get deleted. 397 // get deleted.
398 content::RunAllPendingInMessageLoop(); 398 content::RunAllPendingInMessageLoop();
399 delete autorelease_pool_; 399 delete autorelease_pool_;
400 autorelease_pool_ = NULL; 400 autorelease_pool_ = NULL;
401 #endif 401 #endif
402 } 402 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/bookmarks_ui_browsertest.cc ('k') | chrome/test/base/test_tab_strip_model_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698