OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <exdisp.h> | 7 #include <exdisp.h> |
8 | 8 |
9 #include "app/app_paths.h" | 9 #include "app/app_paths.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 239 |
240 // Override virtual void Initialize to not call icu initialize | 240 // Override virtual void Initialize to not call icu initialize |
241 void CFUrlRequestUnittestRunner::Initialize() { | 241 void CFUrlRequestUnittestRunner::Initialize() { |
242 DCHECK(::GetCurrentThreadId() == test_thread_id_); | 242 DCHECK(::GetCurrentThreadId() == test_thread_id_); |
243 | 243 |
244 // Start by replicating some of the steps that would otherwise be | 244 // Start by replicating some of the steps that would otherwise be |
245 // done by TestSuite::Initialize. We can't call the base class | 245 // done by TestSuite::Initialize. We can't call the base class |
246 // directly because it will attempt to initialize some things such as | 246 // directly because it will attempt to initialize some things such as |
247 // ICU that have already been initialized for this process. | 247 // ICU that have already been initialized for this process. |
248 InitializeLogging(); | 248 InitializeLogging(); |
249 base::Time::EnableHiResClockForTests(); | 249 base::Time::UseHighResolutionTimer(true); |
250 | 250 |
251 #if !defined(PURIFY) && defined(OS_WIN) | 251 #if !defined(PURIFY) && defined(OS_WIN) |
252 logging::SetLogAssertHandler(UnitTestAssertHandler); | 252 logging::SetLogAssertHandler(UnitTestAssertHandler); |
253 #endif // !defined(PURIFY) | 253 #endif // !defined(PURIFY) |
254 | 254 |
255 // Next, do some initialization for NetTestSuite. | 255 // Next, do some initialization for NetTestSuite. |
256 NetTestSuite::InitializeTestThread(); | 256 NetTestSuite::InitializeTestThread(); |
257 } | 257 } |
258 | 258 |
259 void CFUrlRequestUnittestRunner::Shutdown() { | 259 void CFUrlRequestUnittestRunner::Shutdown() { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 // See url_request_unittest.cc for these credentials. | 384 // See url_request_unittest.cc for these credentials. |
385 SupplyProxyCredentials credentials("user", "secret"); | 385 SupplyProxyCredentials credentials("user", "secret"); |
386 watchdog.AddObserver(&credentials); | 386 watchdog.AddObserver(&credentials); |
387 testing::InitGoogleTest(&argc, argv); | 387 testing::InitGoogleTest(&argc, argv); |
388 FilterDisabledTests(); | 388 FilterDisabledTests(); |
389 PluginService::EnableChromePlugins(false); | 389 PluginService::EnableChromePlugins(false); |
390 CFUrlRequestUnittestRunner test_suite(argc, argv); | 390 CFUrlRequestUnittestRunner test_suite(argc, argv); |
391 test_suite.RunMainUIThread(); | 391 test_suite.RunMainUIThread(); |
392 return 0; | 392 return 0; |
393 } | 393 } |
OLD | NEW |