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

Side by Side Diff: content/browser/gpu/gpu_info_browsertest.cc

Issue 21052007: aura: Clean up compositor initialization/destruction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanupcompositor: UseRealGLBindings for CompositingRWHVBrowserTests on win_rel Created 7 years, 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "content/browser/gpu/gpu_data_manager_impl.h" 10 #include "content/browser/gpu/gpu_data_manager_impl.h"
11 #include "content/public/browser/gpu_data_manager_observer.h" 11 #include "content/public/browser/gpu_data_manager_observer.h"
12 #include "content/public/common/content_switches.h" 12 #include "content/public/common/content_switches.h"
13 #include "content/test/content_browser_test.h" 13 #include "content/test/content_browser_test.h"
14 #include "ui/compositor/compositor_setup.h"
15 14
16 namespace content { 15 namespace content {
17 16
18 namespace { 17 namespace {
19 18
20 class TestObserver : public GpuDataManagerObserver { 19 class TestObserver : public GpuDataManagerObserver {
21 public: 20 public:
22 explicit TestObserver(base::MessageLoop* message_loop) 21 explicit TestObserver(base::MessageLoop* message_loop)
23 : message_loop_(message_loop) { 22 : message_loop_(message_loop) {
24 } 23 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 }; 66 };
68 67
69 } // namespace anonymous 68 } // namespace anonymous
70 69
71 class GpuInfoBrowserTest : public ContentBrowserTest { 70 class GpuInfoBrowserTest : public ContentBrowserTest {
72 public: 71 public:
73 GpuInfoBrowserTest() 72 GpuInfoBrowserTest()
74 : message_loop_(base::MessageLoop::TYPE_UI) { 73 : message_loop_(base::MessageLoop::TYPE_UI) {
75 } 74 }
76 75
77 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 76 virtual void SetUp() {
78 ContentBrowserTest::SetUpInProcessBrowserTestFixture(); 77 // We expect real pixel output for these tests.
79 ui::DisableTestCompositor(); 78 UseRealGLContexts();
79
80 ContentBrowserTest::SetUp();
80 } 81 }
81 82
82 base::MessageLoop* GetMessageLoop() { return &message_loop_; } 83 base::MessageLoop* GetMessageLoop() { return &message_loop_; }
83 84
84 private: 85 private:
85 base::MessageLoop message_loop_; 86 base::MessageLoop message_loop_;
86 87
87 DISALLOW_COPY_AND_ASSIGN(GpuInfoBrowserTest); 88 DISALLOW_COPY_AND_ASSIGN(GpuInfoBrowserTest);
88 }; 89 };
89 90
(...skipping 10 matching lines...) Expand all
100 #endif 101 #endif
101 TestObserver observer(GetMessageLoop()); 102 TestObserver observer(GetMessageLoop());
102 GpuDataManagerImpl::GetInstance()->AddObserver(&observer); 103 GpuDataManagerImpl::GetInstance()->AddObserver(&observer);
103 GpuDataManagerImpl::GetInstance()->RequestCompleteGpuInfoIfNeeded(); 104 GpuDataManagerImpl::GetInstance()->RequestCompleteGpuInfoIfNeeded();
104 105
105 GetMessageLoop()->Run(); 106 GetMessageLoop()->Run();
106 } 107 }
107 108
108 } // namespace content 109 } // namespace content
109 110
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_host_browsertest.cc ('k') | content/browser/gpu/gpu_ipc_browsertests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698