OLD | NEW |
1 // Copyright (c) 2010 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/in_process_browser_test.h" | 5 #include "chrome/test/in_process_browser_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/mac/scoped_nsautorelease_pool.h" | 10 #include "base/mac/scoped_nsautorelease_pool.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
(...skipping 27 matching lines...) Expand all Loading... |
39 #include "chrome/test/ui_test_utils.h" | 39 #include "chrome/test/ui_test_utils.h" |
40 #include "net/base/mock_host_resolver.h" | 40 #include "net/base/mock_host_resolver.h" |
41 #include "net/test/test_server.h" | 41 #include "net/test/test_server.h" |
42 #include "sandbox/src/dep.h" | 42 #include "sandbox/src/dep.h" |
43 | 43 |
44 #if defined(OS_MACOSX) | 44 #if defined(OS_MACOSX) |
45 #include "base/mac/mac_util.h" | 45 #include "base/mac/mac_util.h" |
46 #endif | 46 #endif |
47 | 47 |
48 #if defined(OS_WIN) | 48 #if defined(OS_WIN) |
49 #include "chrome/browser/views/frame/browser_view.h" | 49 #include "chrome/browser/ui/views/frame/browser_view.h" |
50 #endif | 50 #endif |
51 | 51 |
52 namespace { | 52 namespace { |
53 | 53 |
54 void InitializeBrowser(Browser* browser) { | 54 void InitializeBrowser(Browser* browser) { |
55 browser->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL), | 55 browser->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL), |
56 PageTransition::START_PAGE); | 56 PageTransition::START_PAGE); |
57 | 57 |
58 // Wait for the page to finish loading. | 58 // Wait for the page to finish loading. |
59 ui_test_utils::WaitForNavigation( | 59 ui_test_utils::WaitForNavigation( |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 return; | 349 return; |
350 | 350 |
351 // Invoke CloseAllBrowsersAndExit on a running message loop. | 351 // Invoke CloseAllBrowsersAndExit on a running message loop. |
352 // CloseAllBrowsersAndExit exits the message loop after everything has been | 352 // CloseAllBrowsersAndExit exits the message loop after everything has been |
353 // shut down properly. | 353 // shut down properly. |
354 MessageLoopForUI::current()->PostTask( | 354 MessageLoopForUI::current()->PostTask( |
355 FROM_HERE, | 355 FROM_HERE, |
356 NewRunnableFunction(&BrowserList::CloseAllBrowsersAndExit)); | 356 NewRunnableFunction(&BrowserList::CloseAllBrowsersAndExit)); |
357 ui_test_utils::RunMessageLoop(); | 357 ui_test_utils::RunMessageLoop(); |
358 } | 358 } |
OLD | NEW |