| Index: trunk/src/content/browser/renderer_host/render_widget_host_view_browsertest.cc
|
| ===================================================================
|
| --- trunk/src/content/browser/renderer_host/render_widget_host_view_browsertest.cc (revision 216906)
|
| +++ trunk/src/content/browser/renderer_host/render_widget_host_view_browsertest.cc (working copy)
|
| @@ -28,6 +28,7 @@
|
| #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,18 +212,6 @@
|
| class CompositingRenderWidgetHostViewBrowserTest
|
| : public RenderWidgetHostViewBrowserTest {
|
| public:
|
| - virtual void SetUp() OVERRIDE {
|
| - // We expect real pixel output for these tests.
|
| - UseRealGLContexts();
|
| -
|
| - // On legacy windows, these tests need real GL bindings to pass.
|
| -#if defined(OS_WIN) && !defined(USE_AURA)
|
| - UseRealGLBindings();
|
| -#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
|
| @@ -341,6 +330,15 @@
|
| // is enabled.
|
| IN_PROC_BROWSER_TEST_F(CompositingRenderWidgetHostViewBrowserTest,
|
| CopyFromBackingStore) {
|
| +#if defined(USE_AURA)
|
| + if (ui::IsTestCompositorEnabled()) {
|
| + LOG(WARNING) << ("Blindly passing this test: Aura test compositor doesn't "
|
| + "support copying from backing store.");
|
| + // TODO(jbauman): Aura test compositor should support copying from backing
|
| + // store. http://crbug.com/268644
|
| + return;
|
| + }
|
| +#endif
|
| RunBasicCopyFromBackingStoreTest();
|
| }
|
|
|
| @@ -383,7 +381,6 @@
|
| "not supported on this platform.");
|
| return;
|
| }
|
| -
|
| base::RunLoop run_loop;
|
| scoped_refptr<media::VideoFrame> dest =
|
| media::VideoFrame::CreateBlackFrame(frame_size());
|
| @@ -417,6 +414,15 @@
|
| "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(
|
| @@ -444,6 +450,16 @@
|
| return;
|
| }
|
|
|
| +#if defined(USE_AURA)
|
| + if (ui::IsTestCompositorEnabled()) {
|
| + LOG(WARNING) << ("Blindly passing this test: Aura test compositor doesn't "
|
| + "support copying to video frame.");
|
| + // TODO(jbauman): Aura test compositor should support copying to video
|
| + // frame. http://crbug.com/268644
|
| + return;
|
| + }
|
| +#endif
|
| +
|
| base::RunLoop run_loop;
|
| scoped_refptr<media::VideoFrame> first_output =
|
| media::VideoFrame::CreateBlackFrame(frame_size());
|
| @@ -480,6 +496,23 @@
|
| allowable_error_(0),
|
| test_url_("data:text/html,<!doctype html>") {}
|
|
|
| + virtual void SetUp() OVERRIDE {
|
| + ui::DisableTestCompositor();
|
| + CompositingRenderWidgetHostViewBrowserTest::SetUp();
|
| + }
|
| +
|
| + 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);
|
| + }
|
| + }
|
| +
|
| void CopyFromCompositingSurfaceCallback(base::Closure quit_callback,
|
| bool result,
|
| const SkBitmap& bitmap) {
|
|
|