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

Side by Side Diff: content/test/content_test_suite.cc

Issue 8805033: Makes tests either use mock compositor or mock WebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback and tweaks for win_aura Created 9 years 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') | ui/aura/aura.gyp » ('j') | 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) 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 "content/test/content_test_suite.h" 5 #include "content/test/content_test_suite.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/browser/mock_content_browser_client.h" 9 #include "content/browser/mock_content_browser_client.h"
10 #include "content/browser/notification_service_impl.h" 10 #include "content/browser/notification_service_impl.h"
11 #include "content/public/common/content_client.h" 11 #include "content/public/common/content_client.h"
12 #include "content/public/common/content_paths.h" 12 #include "content/public/common/content_paths.h"
13 #include "content/test/test_content_client.h" 13 #include "content/test/test_content_client.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "ui/base/ui_base_paths.h" 15 #include "ui/base/ui_base_paths.h"
16 #include "ui/gfx/test/gfx_test_utils.h"
17 16
18 #if defined(OS_MACOSX) 17 #if defined(OS_MACOSX)
19 #include "base/mac/scoped_nsautorelease_pool.h" 18 #include "base/mac/scoped_nsautorelease_pool.h"
20 #endif 19 #endif
20 #if defined(USE_WEBKIT_COMPOSITOR)
21 #include "ui/gfx/compositor/compositor_setup.h"
22 #else
23 #include "ui/gfx/test/gfx_test_utils.h"
24 #endif
21 25
22 namespace { 26 namespace {
23 27
24 class TestContentClientInitializer : public testing::EmptyTestEventListener { 28 class TestContentClientInitializer : public testing::EmptyTestEventListener {
25 public: 29 public:
26 TestContentClientInitializer() { 30 TestContentClientInitializer() {
27 } 31 }
28 32
29 virtual void OnTestStart(const testing::TestInfo& test_info) OVERRIDE { 33 virtual void OnTestStart(const testing::TestInfo& test_info) OVERRIDE {
30 notification_service_.reset(new NotificationServiceImpl()); 34 notification_service_.reset(new NotificationServiceImpl());
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #if defined(OS_MACOSX) 72 #if defined(OS_MACOSX)
69 base::mac::ScopedNSAutoreleasePool autorelease_pool; 73 base::mac::ScopedNSAutoreleasePool autorelease_pool;
70 #endif 74 #endif
71 75
72 base::TestSuite::Initialize(); 76 base::TestSuite::Initialize();
73 77
74 content::RegisterPathProvider(); 78 content::RegisterPathProvider();
75 ui::RegisterPathProvider(); 79 ui::RegisterPathProvider();
76 80
77 // Mock out the compositor on platforms that use it. 81 // Mock out the compositor on platforms that use it.
82 #if defined(USE_WEBKIT_COMPOSITOR)
83 ui::SetupTestCompositor();
84 #else
78 ui::gfx_test_utils::SetupTestCompositor(); 85 ui::gfx_test_utils::SetupTestCompositor();
86 #endif
79 87
80 testing::TestEventListeners& listeners = 88 testing::TestEventListeners& listeners =
81 testing::UnitTest::GetInstance()->listeners(); 89 testing::UnitTest::GetInstance()->listeners();
82 listeners.Append(new TestContentClientInitializer); 90 listeners.Append(new TestContentClientInitializer);
83 } 91 }
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | ui/aura/aura.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698