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

Side by Side Diff: chrome_frame/test/net/fake_external_tab.cc

Issue 8477004: Have content/ create and destroy its own threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More IWYU, missing link-time dependency for Chrome Frame. Created 9 years, 1 month 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) 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 "chrome_frame/test/net/fake_external_tab.h" 5 #include "chrome_frame/test/net/fake_external_tab.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlcom.h> 8 #include <atlcom.h>
9 #include <exdisp.h> 9 #include <exdisp.h>
10 10
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 299
300 ResourceBundle::CleanupSharedInstance(); 300 ResourceBundle::CleanupSharedInstance();
301 } 301 }
302 302
303 CFUrlRequestUnittestRunner::CFUrlRequestUnittestRunner(int argc, char** argv) 303 CFUrlRequestUnittestRunner::CFUrlRequestUnittestRunner(int argc, char** argv)
304 : NetTestSuite(argc, argv), 304 : NetTestSuite(argc, argv),
305 chrome_frame_html_("/chrome_frame", kChromeFrameHtml), 305 chrome_frame_html_("/chrome_frame", kChromeFrameHtml),
306 registrar_(chrome_frame_test::GetTestBedType()), 306 registrar_(chrome_frame_test::GetTestBedType()),
307 test_result_(0) { 307 test_result_(0) {
308 // Register the main thread by instantiating it, but don't call any methods. 308 // Register the main thread by instantiating it, but don't call any methods.
309 main_thread_.reset(new content::DeprecatedBrowserThread( 309 main_thread_.reset(new content::TestBrowserThread(
310 BrowserThread::UI, MessageLoop::current())); 310 BrowserThread::UI, MessageLoop::current()));
311 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 311 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
312 fake_chrome_.Initialize(); 312 fake_chrome_.Initialize();
313 pss_subclass_.reset(new ProcessSingletonSubclass(this)); 313 pss_subclass_.reset(new ProcessSingletonSubclass(this));
314 EXPECT_TRUE(pss_subclass_->Subclass(fake_chrome_.user_data())); 314 EXPECT_TRUE(pss_subclass_->Subclass(fake_chrome_.user_data()));
315 StartChromeFrameInHostBrowser(); 315 StartChromeFrameInHostBrowser();
316 } 316 }
317 317
318 CFUrlRequestUnittestRunner::~CFUrlRequestUnittestRunner() { 318 CFUrlRequestUnittestRunner::~CFUrlRequestUnittestRunner() {
319 fake_chrome_.Shutdown(); 319 fake_chrome_.Shutdown();
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL); 617 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL);
618 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL); 618 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL);
619 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which 619 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which
620 // check if globals are created and destroyed on the same thread don't fire. 620 // check if globals are created and destroyed on the same thread don't fire.
621 // Webkit global objects are created on the inproc renderer thread. 621 // Webkit global objects are created on the inproc renderer thread.
622 #if !defined(NDEBUG) 622 #if !defined(NDEBUG)
623 ExitProcess(test_suite.test_result()); 623 ExitProcess(test_suite.test_result());
624 #endif // NDEBUG 624 #endif // NDEBUG
625 return test_suite.test_result(); 625 return test_suite.test_result();
626 } 626 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698