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

Unified Diff: content/browser/renderer_host/render_widget_host_view_browsertest.cc

Issue 21052007: aura: Clean up compositor initialization/destruction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanupcompositor: UsesTestContexts -> DoesCreateTestContexts 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_browsertest.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
index 78091320adb0260610cf531080816249152df7f6..dbd99e4b44c0cb32bd162930fd544070d1e8c0d9 100644
--- a/content/browser/renderer_host/render_widget_host_view_browsertest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
@@ -27,7 +27,6 @@
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkDevice.h"
#include "ui/base/ui_base_switches.h"
-#include "ui/compositor/compositor_setup.h"
#include "ui/gfx/size_conversions.h"
#include "ui/gl/gl_switches.h"
@@ -211,6 +210,15 @@ class RenderWidgetHostViewBrowserTest : public ContentBrowserTest {
class CompositingRenderWidgetHostViewBrowserTest
: public RenderWidgetHostViewBrowserTest {
public:
+ virtual void SetUp() OVERRIDE {
+#if defined(USE_AURA)
+ // We expect real pixel output for these tests.
+ UseRealGLContexts();
+#endif
+
+ RenderWidgetHostViewBrowserTest::SetUp();
+ }
+
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
// Note: Not appending kForceCompositingMode switch here, since not all bots
// support compositing. Some bots will run with compositing on, and others
@@ -405,15 +413,6 @@ IN_PROC_BROWSER_TEST_F(CompositingRenderWidgetHostViewBrowserTest,
"supported on this platform.");
return;
}
-#if defined(USE_AURA)
- if (ui::IsTestCompositorEnabled()) {
- LOG(WARNING) << ("Blindly passing this test: Aura test compositor doesn't "
- "support frame subscription.");
- // TODO(miu): Aura test compositor should support frame subscription for
- // testing. http://crbug.com/240572
- return;
- }
-#endif
base::RunLoop run_loop;
scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber(
@@ -478,20 +477,12 @@ class CompositingRenderWidgetHostViewBrowserTestTabCapture
test_url_("data:text/html,<!doctype html>") {}
virtual void SetUp() OVERRIDE {
- ui::DisableTestCompositor();
- CompositingRenderWidgetHostViewBrowserTest::SetUp();
- }
+#if defined(USE_AURA)
+ // We expect real pixel output for these tests.
+ UseRealGLContexts();
+#endif
- virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
- // TODO(Hubbe): This code is very similar to some code in
- // gpu_feature_browsertest.cc, and should really be shared in a common
- // location.
- if (!command_line->HasSwitch(switches::kUseGpuInTests)) {
- CHECK(!command_line->HasSwitch(switches::kUseGL))
- << "kUseGL must not be set by test framework code!";
- command_line->AppendSwitchASCII(switches::kUseGL,
- gfx::kGLImplementationOSMesaName);
- }
+ CompositingRenderWidgetHostViewBrowserTest::SetUp();
}
void CopyFromCompositingSurfaceCallback(base::Closure quit_callback,

Powered by Google App Engine
This is Rietveld 408576698