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

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

Issue 2835233002: Fix integration tests in src/chrome and src/extensions so that we can turn on IO thread checks wi... (Closed)
Patch Set: ready for review Created 3 years, 7 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) 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/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 // TODO(pkotwicz): Investigate if we can remove this switch. 293 // TODO(pkotwicz): Investigate if we can remove this switch.
294 if (exit_when_last_browser_closes_) 294 if (exit_when_last_browser_closes_)
295 command_line->AppendSwitch(switches::kDisableZeroBrowsersOpenForTests); 295 command_line->AppendSwitch(switches::kDisableZeroBrowsersOpenForTests);
296 296
297 if (open_about_blank_on_browser_launch_ && command_line->GetArgs().empty()) 297 if (open_about_blank_on_browser_launch_ && command_line->GetArgs().empty())
298 command_line->AppendArg(url::kAboutBlankURL); 298 command_line->AppendArg(url::kAboutBlankURL);
299 } 299 }
300 300
301 bool InProcessBrowserTest::RunAccessibilityChecks(std::string* error_message) { 301 bool InProcessBrowserTest::RunAccessibilityChecks(std::string* error_message) {
302 base::ThreadRestrictions::ScopedAllowIO allow_io;
302 if (!browser()) { 303 if (!browser()) {
303 *error_message = "browser is NULL"; 304 *error_message = "browser is NULL";
304 return false; 305 return false;
305 } 306 }
306 auto* tab_strip = browser()->tab_strip_model(); 307 auto* tab_strip = browser()->tab_strip_model();
307 if (!tab_strip) { 308 if (!tab_strip) {
308 *error_message = "tab_strip is NULL"; 309 *error_message = "tab_strip is NULL";
309 return false; 310 return false;
310 } 311 }
311 auto* web_contents = tab_strip->GetActiveWebContents(); 312 auto* web_contents = tab_strip->GetActiveWebContents();
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 // On the Mac, this eventually reaches 622 // On the Mac, this eventually reaches
622 // -[BrowserWindowController windowWillClose:], which will post a deferred 623 // -[BrowserWindowController windowWillClose:], which will post a deferred
623 // -autorelease on itself to ultimately destroy the Browser object. The line 624 // -autorelease on itself to ultimately destroy the Browser object. The line
624 // below is necessary to pump these pending messages to ensure all Browsers 625 // below is necessary to pump these pending messages to ensure all Browsers
625 // get deleted. 626 // get deleted.
626 content::RunAllPendingInMessageLoop(); 627 content::RunAllPendingInMessageLoop();
627 delete autorelease_pool_; 628 delete autorelease_pool_;
628 autorelease_pool_ = NULL; 629 autorelease_pool_ = NULL;
629 #endif 630 #endif
630 } 631 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/test_files_request_filter.cc ('k') | chrome/test/base/javascript_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698