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

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

Issue 1011133006: Move V8 snapshot loading code from isolate_holder to gin/v8_startup_data.{h,cc}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS tweak suggested by jochen. Created 5 years, 8 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
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/metrics/statistics_recorder.h" 10 #include "base/metrics/statistics_recorder.h"
(...skipping 26 matching lines...) Expand all
37 #include "ui/gfx/android/gfx_jni_registrar.h" 37 #include "ui/gfx/android/gfx_jni_registrar.h"
38 #include "ui/gl/android/gl_jni_registrar.h" 38 #include "ui/gl/android/gl_jni_registrar.h"
39 #include "ui/shell_dialogs/android/shell_dialogs_jni_registrar.h" 39 #include "ui/shell_dialogs/android/shell_dialogs_jni_registrar.h"
40 #endif 40 #endif
41 41
42 #if defined(USE_OZONE) 42 #if defined(USE_OZONE)
43 #include "ui/ozone/public/ozone_platform.h" 43 #include "ui/ozone/public/ozone_platform.h"
44 #endif 44 #endif
45 45
46 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 46 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
47 #include "gin/public/isolate_holder.h" 47 #include "gin/v8_initializer.h"
48 #endif 48 #endif
49 49
50 namespace content { 50 namespace content {
51 51
52 class ContentTestSuiteBaseListener : public testing::EmptyTestEventListener { 52 class ContentTestSuiteBaseListener : public testing::EmptyTestEventListener {
53 public: 53 public:
54 ContentTestSuiteBaseListener() { 54 ContentTestSuiteBaseListener() {
55 } 55 }
56 virtual void OnTestEnd(const testing::TestInfo& test_info) override { 56 virtual void OnTestEnd(const testing::TestInfo& test_info) override {
57 BrowserThreadImpl::FlushThreadPoolHelperForTesting(); 57 BrowserThreadImpl::FlushThreadPoolHelperForTesting();
58 } 58 }
59 private: 59 private:
60 DISALLOW_COPY_AND_ASSIGN(ContentTestSuiteBaseListener); 60 DISALLOW_COPY_AND_ASSIGN(ContentTestSuiteBaseListener);
61 }; 61 };
62 62
63 ContentTestSuiteBase::ContentTestSuiteBase(int argc, char** argv) 63 ContentTestSuiteBase::ContentTestSuiteBase(int argc, char** argv)
64 : base::TestSuite(argc, argv) { 64 : base::TestSuite(argc, argv) {
65 } 65 }
66 66
67 void ContentTestSuiteBase::Initialize() { 67 void ContentTestSuiteBase::Initialize() {
68 base::TestSuite::Initialize(); 68 base::TestSuite::Initialize();
69 69
70 // Initialize the histograms subsystem, so that any histograms hit in tests 70 // Initialize the histograms subsystem, so that any histograms hit in tests
71 // are correctly registered with the statistics recorder and can be queried 71 // are correctly registered with the statistics recorder and can be queried
72 // by tests. 72 // by tests.
73 base::StatisticsRecorder::Initialize(); 73 base::StatisticsRecorder::Initialize();
74 74
75 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 75 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
76 gin::IsolateHolder::LoadV8Snapshot(); 76 gin::V8Initializer::LoadV8Snapshot();
77 #endif 77 #endif
78 78
79 #if defined(OS_ANDROID) 79 #if defined(OS_ANDROID)
80 // Register JNI bindings for android. 80 // Register JNI bindings for android.
81 JNIEnv* env = base::android::AttachCurrentThread(); 81 JNIEnv* env = base::android::AttachCurrentThread();
82 content::android::RegisterCommonJni(env); 82 content::android::RegisterCommonJni(env);
83 content::android::RegisterBrowserJni(env); 83 content::android::RegisterBrowserJni(env);
84 gfx::android::RegisterJni(env); 84 gfx::android::RegisterJni(env);
85 media::RegisterJni(env); 85 media::RegisterJni(env);
86 net::android::RegisterJni(env); 86 net::android::RegisterJni(env);
(...skipping 24 matching lines...) Expand all
111 #if !defined(OS_IOS) 111 #if !defined(OS_IOS)
112 UtilityProcessHostImpl::RegisterUtilityMainThreadFactory( 112 UtilityProcessHostImpl::RegisterUtilityMainThreadFactory(
113 CreateInProcessUtilityThread); 113 CreateInProcessUtilityThread);
114 RenderProcessHostImpl::RegisterRendererMainThreadFactory( 114 RenderProcessHostImpl::RegisterRendererMainThreadFactory(
115 CreateInProcessRendererThread); 115 CreateInProcessRendererThread);
116 GpuProcessHost::RegisterGpuMainThreadFactory(CreateInProcessGpuThread); 116 GpuProcessHost::RegisterGpuMainThreadFactory(CreateInProcessGpuThread);
117 #endif 117 #endif
118 } 118 }
119 119
120 } // namespace content 120 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698