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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "chrome_frame/utils.h" 48 #include "chrome_frame/utils.h"
49 #include "content/browser/plugin_service.h" 49 #include "content/browser/plugin_service.h"
50 #include "content/browser/renderer_host/render_process_host.h" 50 #include "content/browser/renderer_host/render_process_host.h"
51 #include "content/browser/notification_service_impl.h" 51 #include "content/browser/notification_service_impl.h"
52 #include "content/public/common/content_client.h" 52 #include "content/public/common/content_client.h"
53 #include "content/public/common/content_paths.h" 53 #include "content/public/common/content_paths.h"
54 #include "testing/gtest/include/gtest/gtest.h" 54 #include "testing/gtest/include/gtest/gtest.h"
55 #include "ui/base/resource/resource_bundle.h" 55 #include "ui/base/resource/resource_bundle.h"
56 #include "ui/base/ui_base_paths.h" 56 #include "ui/base/ui_base_paths.h"
57 57
58 using content::BrowserThread;
59
58 namespace { 60 namespace {
59 61
60 // A special command line switch to allow developers to manually launch the 62 // A special command line switch to allow developers to manually launch the
61 // browser and debug CF inside the browser. 63 // browser and debug CF inside the browser.
62 const char kManualBrowserLaunch[] = "manual-browser"; 64 const char kManualBrowserLaunch[] = "manual-browser";
63 65
64 // Pops up a message box after the test environment has been set up 66 // Pops up a message box after the test environment has been set up
65 // and before tearing it down. Useful for when debugging tests and not 67 // and before tearing it down. Useful for when debugging tests and not
66 // the test environment that's been set up. 68 // the test environment that's been set up.
67 const char kPromptAfterSetup[] = "prompt-after-setup"; 69 const char kPromptAfterSetup[] = "prompt-after-setup";
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 299
298 ResourceBundle::CleanupSharedInstance(); 300 ResourceBundle::CleanupSharedInstance();
299 } 301 }
300 302
301 CFUrlRequestUnittestRunner::CFUrlRequestUnittestRunner(int argc, char** argv) 303 CFUrlRequestUnittestRunner::CFUrlRequestUnittestRunner(int argc, char** argv)
302 : NetTestSuite(argc, argv), 304 : NetTestSuite(argc, argv),
303 chrome_frame_html_("/chrome_frame", kChromeFrameHtml), 305 chrome_frame_html_("/chrome_frame", kChromeFrameHtml),
304 registrar_(chrome_frame_test::GetTestBedType()), 306 registrar_(chrome_frame_test::GetTestBedType()),
305 test_result_(0) { 307 test_result_(0) {
306 // 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.
307 main_thread_.reset(new DeprecatedBrowserThread(BrowserThread::UI, 309 main_thread_.reset(new content::DeprecatedBrowserThread(
308 MessageLoop::current())); 310 BrowserThread::UI, MessageLoop::current()));
309 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 311 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
310 fake_chrome_.Initialize(); 312 fake_chrome_.Initialize();
311 pss_subclass_.reset(new ProcessSingletonSubclass(this)); 313 pss_subclass_.reset(new ProcessSingletonSubclass(this));
312 EXPECT_TRUE(pss_subclass_->Subclass(fake_chrome_.user_data())); 314 EXPECT_TRUE(pss_subclass_->Subclass(fake_chrome_.user_data()));
313 StartChromeFrameInHostBrowser(); 315 StartChromeFrameInHostBrowser();
314 } 316 }
315 317
316 CFUrlRequestUnittestRunner::~CFUrlRequestUnittestRunner() { 318 CFUrlRequestUnittestRunner::~CFUrlRequestUnittestRunner() {
317 fake_chrome_.Shutdown(); 319 fake_chrome_.Shutdown();
318 } 320 }
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL); 596 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL);
595 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL); 597 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL);
596 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which 598 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which
597 // check if globals are created and destroyed on the same thread don't fire. 599 // check if globals are created and destroyed on the same thread don't fire.
598 // Webkit global objects are created on the inproc renderer thread. 600 // Webkit global objects are created on the inproc renderer thread.
599 #if !defined(NDEBUG) 601 #if !defined(NDEBUG)
600 ExitProcess(test_suite.test_result()); 602 ExitProcess(test_suite.test_result());
601 #endif // NDEBUG 603 #endif // NDEBUG
602 return test_suite.test_result(); 604 return test_suite.test_result();
603 } 605 }
OLDNEW
« no previous file with comments | « chrome_frame/test/net/fake_external_tab.h ('k') | content/browser/appcache/chrome_appcache_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698