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

Side by Side Diff: content/public/test/content_test_suite_base.cc

Issue 19002008: Revert "Remove dependencies on /media for iOS." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/content_tests.gypi ('k') | 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) 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 "content/public/test/content_test_suite_base.h" 5 #include "content/public/test/content_test_suite_base.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/test/test_suite.h" 10 #include "base/test/test_suite.h"
11 #include "base/threading/sequenced_worker_pool.h" 11 #include "base/threading/sequenced_worker_pool.h"
12 #include "content/browser/browser_thread_impl.h" 12 #include "content/browser/browser_thread_impl.h"
13 #include "content/common/url_schemes.h" 13 #include "content/common/url_schemes.h"
14 #include "content/public/common/content_client.h" 14 #include "content/public/common/content_client.h"
15 #include "content/public/common/content_paths.h" 15 #include "content/public/common/content_paths.h"
16 #include "media/base/media.h"
16 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
17 #include "ui/base/ui_base_paths.h" 18 #include "ui/base/ui_base_paths.h"
18 #include "ui/compositor/compositor_setup.h" 19 #include "ui/compositor/compositor_setup.h"
19 20
20 #if defined(OS_ANDROID) 21 #if defined(OS_ANDROID)
21 #include "base/android/jni_android.h" 22 #include "base/android/jni_android.h"
22 #include "content/browser/android/browser_jni_registrar.h" 23 #include "content/browser/android/browser_jni_registrar.h"
23 #include "content/common/android/common_jni_registrar.h" 24 #include "content/common/android/common_jni_registrar.h"
24 #include "media/base/android/media_jni_registrar.h" 25 #include "media/base/android/media_jni_registrar.h"
25 #include "net/android/net_jni_registrar.h" 26 #include "net/android/net_jni_registrar.h"
26 #include "ui/android/ui_jni_registrar.h" 27 #include "ui/android/ui_jni_registrar.h"
27 #include "ui/gl/android/gl_jni_registrar.h" 28 #include "ui/gl/android/gl_jni_registrar.h"
28 #include "ui/shell_dialogs/android/shell_dialogs_jni_registrar.h" 29 #include "ui/shell_dialogs/android/shell_dialogs_jni_registrar.h"
29 #endif 30 #endif
30 31
31 #if !defined(OS_IOS)
32 #include "media/base/media.h"
33 #endif
34
35 namespace content { 32 namespace content {
36 33
37 class ContentTestSuiteBaseListener : public testing::EmptyTestEventListener { 34 class ContentTestSuiteBaseListener : public testing::EmptyTestEventListener {
38 public: 35 public:
39 ContentTestSuiteBaseListener() { 36 ContentTestSuiteBaseListener() {
40 } 37 }
41 virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE { 38 virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE {
42 BrowserThreadImpl::FlushThreadPoolHelper(); 39 BrowserThreadImpl::FlushThreadPoolHelper();
43 } 40 }
44 private: 41 private:
(...skipping 12 matching lines...) Expand all
57 // Register JNI bindings for android. 54 // Register JNI bindings for android.
58 JNIEnv* env = base::android::AttachCurrentThread(); 55 JNIEnv* env = base::android::AttachCurrentThread();
59 content::android::RegisterCommonJni(env); 56 content::android::RegisterCommonJni(env);
60 content::android::RegisterBrowserJni(env); 57 content::android::RegisterBrowserJni(env);
61 media::RegisterJni(env); 58 media::RegisterJni(env);
62 net::android::RegisterJni(env); 59 net::android::RegisterJni(env);
63 ui::android::RegisterJni(env); 60 ui::android::RegisterJni(env);
64 ui::shell_dialogs::RegisterJni(env); 61 ui::shell_dialogs::RegisterJni(env);
65 #endif 62 #endif
66 63
67 #if !defined(OS_IOS)
68 if (external_libraries_enabled_) 64 if (external_libraries_enabled_)
69 media::InitializeMediaLibraryForTesting(); 65 media::InitializeMediaLibraryForTesting();
70 #endif
71 66
72 scoped_ptr<ContentClient> client_for_init(CreateClientForInitialization()); 67 scoped_ptr<ContentClient> client_for_init(CreateClientForInitialization());
73 SetContentClient(client_for_init.get()); 68 SetContentClient(client_for_init.get());
74 RegisterContentSchemes(false); 69 RegisterContentSchemes(false);
75 SetContentClient(NULL); 70 SetContentClient(NULL);
76 71
77 RegisterPathProvider(); 72 RegisterPathProvider();
78 ui::RegisterPathProvider(); 73 ui::RegisterPathProvider();
79 74
80 // Mock out the compositor on platforms that use it. 75 // Mock out the compositor on platforms that use it.
81 ui::SetupTestCompositor(); 76 ui::SetupTestCompositor();
82 77
83 testing::UnitTest::GetInstance()->listeners().Append( 78 testing::UnitTest::GetInstance()->listeners().Append(
84 new ContentTestSuiteBaseListener); 79 new ContentTestSuiteBaseListener);
85 } 80 }
86 81
87 } // namespace content 82 } // namespace content
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698