OLD | NEW |
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/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 70 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
71 #include "chrome/browser/storage_monitor/test_storage_monitor.h" | 71 #include "chrome/browser/storage_monitor/test_storage_monitor.h" |
72 #endif | 72 #endif |
73 | 73 |
74 namespace { | 74 namespace { |
75 | 75 |
76 // Passed as value of kTestType. | 76 // Passed as value of kTestType. |
77 const char kBrowserTestType[] = "browser"; | 77 const char kBrowserTestType[] = "browser"; |
78 | 78 |
79 // Used when running in single-process mode. | 79 // Used when running in single-process mode. |
80 base::LazyInstance<chrome::ChromeContentRendererClient>::Leaky | 80 base::LazyInstance<ChromeContentRendererClient>::Leaky |
81 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; | 81 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; |
82 | 82 |
83 // A BrowserListObserver that makes sure that all browsers created are on the | 83 // A BrowserListObserver that makes sure that all browsers created are on the |
84 // |allowed_desktop_|. | 84 // |allowed_desktop_|. |
85 class SingleDesktopTestObserver : public chrome::BrowserListObserver, | 85 class SingleDesktopTestObserver : public chrome::BrowserListObserver, |
86 public base::NonThreadSafe { | 86 public base::NonThreadSafe { |
87 public: | 87 public: |
88 explicit SingleDesktopTestObserver(chrome::HostDesktopType allowed_desktop); | 88 explicit SingleDesktopTestObserver(chrome::HostDesktopType allowed_desktop); |
89 virtual ~SingleDesktopTestObserver(); | 89 virtual ~SingleDesktopTestObserver(); |
90 | 90 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 // On the Mac, this eventually reaches | 468 // On the Mac, this eventually reaches |
469 // -[BrowserWindowController windowWillClose:], which will post a deferred | 469 // -[BrowserWindowController windowWillClose:], which will post a deferred |
470 // -autorelease on itself to ultimately destroy the Browser object. The line | 470 // -autorelease on itself to ultimately destroy the Browser object. The line |
471 // below is necessary to pump these pending messages to ensure all Browsers | 471 // below is necessary to pump these pending messages to ensure all Browsers |
472 // get deleted. | 472 // get deleted. |
473 content::RunAllPendingInMessageLoop(); | 473 content::RunAllPendingInMessageLoop(); |
474 delete autorelease_pool_; | 474 delete autorelease_pool_; |
475 autorelease_pool_ = NULL; | 475 autorelease_pool_ = NULL; |
476 #endif | 476 #endif |
477 } | 477 } |
OLD | NEW |