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

Side by Side Diff: content/public/test/browser_test_base.h

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
« no previous file with comments | « content/common/gpu/client/gl_helper.cc ('k') | content/public/test/browser_test_base.cc » ('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) 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 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_
6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "net/test/spawned_test_server/spawned_test_server.h" 10 #include "net/test/spawned_test_server/spawned_test_server.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // this. 102 // this.
103 // |test_server_base| is the path, relative to src, to give to the test HTTP 103 // |test_server_base| is the path, relative to src, to give to the test HTTP
104 // server. 104 // server.
105 void CreateTestServer(const base::FilePath& test_server_base); 105 void CreateTestServer(const base::FilePath& test_server_base);
106 106
107 // When the test is running in --single-process mode, runs the given task on 107 // When the test is running in --single-process mode, runs the given task on
108 // the in-process renderer thread. A nested message loop is run until it 108 // the in-process renderer thread. A nested message loop is run until it
109 // returns. 109 // returns.
110 void PostTaskToInProcessRendererAndWait(const base::Closure& task); 110 void PostTaskToInProcessRendererAndWait(const base::Closure& task);
111 111
112 // Call this before SetUp() to use real GL contexts in Compositor for the
113 // test.
114 void UseRealGLContexts() { allow_test_contexts_ = false; }
115
116 // Call this before SetUp() to use real GL drivers instead of OSMesa for the
117 // test.
118 void UseRealGLBindings() { allow_osmesa_ = false; }
119
120 bool UsingAcceleratedVideoDecode() { return using_accelerated_video_decode_; }
121
112 private: 122 private:
113 void ProxyRunTestOnMainThreadLoop(); 123 void ProxyRunTestOnMainThreadLoop();
114 124
115 // Testing server, started on demand. 125 // Testing server, started on demand.
116 scoped_ptr<net::SpawnedTestServer> test_server_; 126 scoped_ptr<net::SpawnedTestServer> test_server_;
117 127
118 // Embedded test server, cheap to create, started on demand. 128 // Embedded test server, cheap to create, started on demand.
119 scoped_ptr<net::test_server::EmbeddedTestServer> embedded_test_server_; 129 scoped_ptr<net::test_server::EmbeddedTestServer> embedded_test_server_;
120 130
131 // When false, the ui::Compositor will be forced to use real GL contexts for
132 // the test, so that it produces real pixel output.
133 bool allow_test_contexts_;
134
135 // When false, the GL backend will use a real GPU. When true, it uses OSMesa
136 // to run GL on the CPU in a way that works across all platforms.
137 bool allow_osmesa_;
138
139 bool using_accelerated_video_decode_;
140
121 #if defined(OS_POSIX) 141 #if defined(OS_POSIX)
122 bool handle_sigterm_; 142 bool handle_sigterm_;
123 #endif 143 #endif
124 }; 144 };
125 145
126 } // namespace content 146 } // namespace content
127 147
128 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ 148 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/client/gl_helper.cc ('k') | content/public/test/browser_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698