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

Side by Side Diff: cc/output/output_surface_unittest.cc

Issue 15579002: Implement transform/clip support for Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Turn on fuzzy comparator for new SoftwareRenderer tests Created 7 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/output/output_surface.h" 5 #include "cc/output/output_surface.h"
6 #include "cc/output/output_surface_client.h" 6 #include "cc/output/output_surface_client.h"
7 #include "cc/test/test_web_graphics_context_3d.h" 7 #include "cc/test/test_web_graphics_context_3d.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 18 matching lines...) Expand all
29 class FakeOutputSurfaceClient : public OutputSurfaceClient { 29 class FakeOutputSurfaceClient : public OutputSurfaceClient {
30 public: 30 public:
31 virtual void SetNeedsRedrawRect(gfx::Rect damage_rect) OVERRIDE {} 31 virtual void SetNeedsRedrawRect(gfx::Rect damage_rect) OVERRIDE {}
32 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, 32 virtual void OnVSyncParametersChanged(base::TimeTicks timebase,
33 base::TimeDelta interval) OVERRIDE {} 33 base::TimeDelta interval) OVERRIDE {}
34 virtual void BeginFrame(base::TimeTicks frame_time) OVERRIDE {} 34 virtual void BeginFrame(base::TimeTicks frame_time) OVERRIDE {}
35 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack) 35 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack)
36 OVERRIDE {} 36 OVERRIDE {}
37 virtual void OnSwapBuffersComplete() OVERRIDE {} 37 virtual void OnSwapBuffersComplete() OVERRIDE {}
38 virtual void DidLoseOutputSurface() OVERRIDE {} 38 virtual void DidLoseOutputSurface() OVERRIDE {}
39 virtual void SetExternalDrawConstraints(const gfx::Transform& transform,
40 gfx::Rect viewport) OVERRIDE {}
39 }; 41 };
40 42
41 TEST(OutputSurfaceTest, ClientPointerIndicatesBindToClientSuccess) { 43 TEST(OutputSurfaceTest, ClientPointerIndicatesBindToClientSuccess) {
42 scoped_ptr<TestWebGraphicsContext3D> context3d = 44 scoped_ptr<TestWebGraphicsContext3D> context3d =
43 TestWebGraphicsContext3D::Create(); 45 TestWebGraphicsContext3D::Create();
44 46
45 TestOutputSurface output_surface( 47 TestOutputSurface output_surface(
46 context3d.PassAs<WebKit::WebGraphicsContext3D>()); 48 context3d.PassAs<WebKit::WebGraphicsContext3D>());
47 EXPECT_EQ(NULL, output_surface.client()); 49 EXPECT_EQ(NULL, output_surface.client());
48 50
(...skipping 13 matching lines...) Expand all
62 context3d.PassAs<WebKit::WebGraphicsContext3D>()); 64 context3d.PassAs<WebKit::WebGraphicsContext3D>());
63 EXPECT_EQ(NULL, output_surface.client()); 65 EXPECT_EQ(NULL, output_surface.client());
64 66
65 FakeOutputSurfaceClient client; 67 FakeOutputSurfaceClient client;
66 EXPECT_FALSE(output_surface.BindToClient(&client)); 68 EXPECT_FALSE(output_surface.BindToClient(&client));
67 EXPECT_EQ(NULL, output_surface.client()); 69 EXPECT_EQ(NULL, output_surface.client());
68 } 70 }
69 71
70 } // namespace 72 } // namespace
71 } // namespace cc 73 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698