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

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

Issue 2175933002: More aggressive IO asserts in content_browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use 1 less instance of ScopedAllowIO in DumpAccessibilityTestBase::RunTestForPlatform. Created 4 years, 4 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
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/public/test/content_browser_test.h" 5 #include "content/public/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/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/threading/thread_restrictions.h"
12 #include "build/build_config.h" 13 #include "build/build_config.h"
13 #include "content/public/browser/render_process_host.h" 14 #include "content/public/browser/render_process_host.h"
14 #include "content/public/common/content_paths.h" 15 #include "content/public/common/content_paths.h"
15 #include "content/public/common/content_switches.h" 16 #include "content/public/common/content_switches.h"
16 #include "content/public/common/url_constants.h" 17 #include "content/public/common/url_constants.h"
17 #include "content/shell/browser/shell.h" 18 #include "content/shell/browser/shell.h"
18 #include "content/shell/browser/shell_browser_context.h" 19 #include "content/shell/browser/shell_browser_context.h"
19 #include "content/shell/browser/shell_content_browser_client.h" 20 #include "content/shell/browser/shell_content_browser_client.h"
20 #include "content/shell/common/shell_switches.h" 21 #include "content/shell/common/shell_switches.h"
21 #include "content/shell/renderer/layout_test/layout_test_content_renderer_client .h" 22 #include "content/shell/renderer/layout_test/layout_test_content_renderer_client .h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 125
125 // Pump startup related events. 126 // Pump startup related events.
126 base::MessageLoopForUI::current()->RunUntilIdle(); 127 base::MessageLoopForUI::current()->RunUntilIdle();
127 128
128 #if defined(OS_MACOSX) 129 #if defined(OS_MACOSX)
129 pool.Recycle(); 130 pool.Recycle();
130 #endif 131 #endif
131 132
132 SetUpOnMainThread(); 133 SetUpOnMainThread();
133 134
135 bool old_io_allowed_value = base::ThreadRestrictions::SetIOAllowed(false);
134 RunTestOnMainThread(); 136 RunTestOnMainThread();
137 base::ThreadRestrictions::SetIOAllowed(old_io_allowed_value);
135 138
136 TearDownOnMainThread(); 139 TearDownOnMainThread();
137 #if defined(OS_MACOSX) 140 #if defined(OS_MACOSX)
138 pool.Recycle(); 141 pool.Recycle();
139 #endif 142 #endif
140 143
141 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); 144 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
142 !i.IsAtEnd(); i.Advance()) { 145 !i.IsAtEnd(); i.Advance()) {
143 i.GetCurrentValue()->FastShutdownIfPossible(); 146 i.GetCurrentValue()->FastShutdownIfPossible();
144 } 147 }
(...skipping 11 matching lines...) Expand all
156 159
157 Shell* ContentBrowserTest::CreateOffTheRecordBrowser() { 160 Shell* ContentBrowserTest::CreateOffTheRecordBrowser() {
158 return Shell::CreateNewWindow( 161 return Shell::CreateNewWindow(
159 ShellContentBrowserClient::Get()->off_the_record_browser_context(), 162 ShellContentBrowserClient::Get()->off_the_record_browser_context(),
160 GURL(url::kAboutBlankURL), 163 GURL(url::kAboutBlankURL),
161 NULL, 164 NULL,
162 gfx::Size()); 165 gfx::Size());
163 } 166 }
164 167
165 } // namespace content 168 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_mojo_browsertest.cc ('k') | content/public/test/content_browser_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698