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

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

Issue 344025: Instantiate a dummy notification service instance in chrome frame on the thre... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "app/win_util.h" 11 #include "app/win_util.h"
12 12
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/file_util.h" 14 #include "base/file_util.h"
15 #include "base/i18n/icu_util.h" 15 #include "base/i18n/icu_util.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "base/scoped_bstr_win.h" 17 #include "base/scoped_bstr_win.h"
18 #include "base/scoped_comptr_win.h" 18 #include "base/scoped_comptr_win.h"
19 #include "base/scoped_variant_win.h" 19 #include "base/scoped_variant_win.h"
20 20
21 #include "chrome/browser/browser_prefs.h" 21 #include "chrome/browser/browser_prefs.h"
22 #include "chrome/browser/process_singleton.h" 22 #include "chrome/browser/process_singleton.h"
23 #include "chrome/browser/profile_manager.h" 23 #include "chrome/browser/profile_manager.h"
24 #include "chrome/browser/renderer_host/render_process_host.h" 24 #include "chrome/browser/renderer_host/render_process_host.h"
25 #include "chrome/common/chrome_constants.h" 25 #include "chrome/common/chrome_constants.h"
26 #include "chrome/common/chrome_paths.h" 26 #include "chrome/common/chrome_paths.h"
27 #include "chrome/common/chrome_paths_internal.h" 27 #include "chrome/common/chrome_paths_internal.h"
28 #include "chrome/common/chrome_switches.h" 28 #include "chrome/common/chrome_switches.h"
29 #include "chrome/common/notification_service.h"
29 #include "chrome/common/pref_names.h" 30 #include "chrome/common/pref_names.h"
30 31
31 #include "chrome_frame/utils.h" 32 #include "chrome_frame/utils.h"
32 #include "chrome_frame/test/chrome_frame_test_utils.h" 33 #include "chrome_frame/test/chrome_frame_test_utils.h"
33 #include "chrome_frame/test/net/dialog_watchdog.h" 34 #include "chrome_frame/test/net/dialog_watchdog.h"
34 #include "chrome_frame/test/net/test_automation_resource_message_filter.h" 35 #include "chrome_frame/test/net/test_automation_resource_message_filter.h"
35 36
36 namespace { 37 namespace {
37 38
38 // A special command line switch to allow developers to manually launch the 39 // A special command line switch to allow developers to manually launch the
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 291
291 DCHECK_EQ(test_thread_.IsValid(), false); 292 DCHECK_EQ(test_thread_.IsValid(), false);
292 test_thread_.Set(::CreateThread(NULL, 0, RunAllUnittests, this, 0, 293 test_thread_.Set(::CreateThread(NULL, 0, RunAllUnittests, this, 0,
293 &test_thread_id_)); 294 &test_thread_id_));
294 DCHECK(test_thread_.IsValid()); 295 DCHECK(test_thread_.IsValid());
295 } 296 }
296 297
297 // static 298 // static
298 DWORD CFUrlRequestUnittestRunner::RunAllUnittests(void* param) { 299 DWORD CFUrlRequestUnittestRunner::RunAllUnittests(void* param) {
299 PlatformThread::SetName("CFUrlRequestUnittestRunner"); 300 PlatformThread::SetName("CFUrlRequestUnittestRunner");
301 // Needed for some url request tests like the intercept job tests, etc.
302 NotificationService service;
300 CFUrlRequestUnittestRunner* me = 303 CFUrlRequestUnittestRunner* me =
301 reinterpret_cast<CFUrlRequestUnittestRunner*>(param); 304 reinterpret_cast<CFUrlRequestUnittestRunner*>(param);
302 me->Run(); 305 me->Run();
303 me->fake_chrome_.ui_loop()->PostTask(FROM_HERE, 306 me->fake_chrome_.ui_loop()->PostTask(FROM_HERE,
304 NewRunnableFunction(TakeDownBrowser, me)); 307 NewRunnableFunction(TakeDownBrowser, me));
305 return 0; 308 return 0;
306 } 309 }
307 310
308 // static 311 // static
309 void CFUrlRequestUnittestRunner::TakeDownBrowser( 312 void CFUrlRequestUnittestRunner::TakeDownBrowser(
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 DialogWatchdog watchdog; 384 DialogWatchdog watchdog;
382 // See url_request_unittest.cc for these credentials. 385 // See url_request_unittest.cc for these credentials.
383 SupplyProxyCredentials credentials("user", "secret"); 386 SupplyProxyCredentials credentials("user", "secret");
384 watchdog.AddObserver(&credentials); 387 watchdog.AddObserver(&credentials);
385 testing::InitGoogleTest(&argc, argv); 388 testing::InitGoogleTest(&argc, argv);
386 FilterDisabledTests(); 389 FilterDisabledTests();
387 CFUrlRequestUnittestRunner test_suite(argc, argv); 390 CFUrlRequestUnittestRunner test_suite(argc, argv);
388 test_suite.RunMainUIThread(); 391 test_suite.RunMainUIThread();
389 return 0; 392 return 0;
390 } 393 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698