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

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

Issue 9981015: Add an interface for Flash to clear its data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser tests Created 8 years, 8 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/debug/stack_trace.h" 10 #include "base/debug/stack_trace.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 193 }
194 } 194 }
195 return test_launcher_utils::OverrideUserDataDir(user_data_dir); 195 return test_launcher_utils::OverrideUserDataDir(user_data_dir);
196 } 196 }
197 197
198 void InProcessBrowserTest::TearDown() { 198 void InProcessBrowserTest::TearDown() {
199 DCHECK(!g_browser_process); 199 DCHECK(!g_browser_process);
200 BrowserTestBase::TearDown(); 200 BrowserTestBase::TearDown();
201 } 201 }
202 202
203 content::BrowserContext* InProcessBrowserTest::GetBrowserContext() {
204 return browser_->profile();
205 }
206
203 content::ResourceContext* InProcessBrowserTest::GetResourceContext() { 207 content::ResourceContext* InProcessBrowserTest::GetResourceContext() {
204 return browser_->profile()->GetResourceContext(); 208 return browser_->profile()->GetResourceContext();
205 } 209 }
206 210
207 void InProcessBrowserTest::AddTabAtIndexToBrowser( 211 void InProcessBrowserTest::AddTabAtIndexToBrowser(
208 Browser* browser, 212 Browser* browser,
209 int index, 213 int index,
210 const GURL& url, 214 const GURL& url,
211 content::PageTransition transition) { 215 content::PageTransition transition) {
212 browser::NavigateParams params(browser, url, transition); 216 browser::NavigateParams params(browser, url, transition);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 if (BrowserList::size() == 0) 348 if (BrowserList::size() == 0)
345 return; 349 return;
346 350
347 // Invoke CloseAllBrowsersAndMayExit on a running message loop. 351 // Invoke CloseAllBrowsersAndMayExit on a running message loop.
348 // CloseAllBrowsersAndMayExit exits the message loop after everything has been 352 // CloseAllBrowsersAndMayExit exits the message loop after everything has been
349 // shut down properly. 353 // shut down properly.
350 MessageLoopForUI::current()->PostTask(FROM_HERE, 354 MessageLoopForUI::current()->PostTask(FROM_HERE,
351 base::Bind(&BrowserList::AttemptExit)); 355 base::Bind(&BrowserList::AttemptExit));
352 ui_test_utils::RunMessageLoop(); 356 ui_test_utils::RunMessageLoop();
353 } 357 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698