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

Unified Diff: webkit/compositor_bindings/WebLayerTest.cpp

Issue 10963056: [cc] Add window decoration layers (NinePatch) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hacky rebase for Jerome to use Created 8 years, 2 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: webkit/compositor_bindings/WebLayerTest.cpp
diff --git a/webkit/compositor_bindings/WebLayerTest.cpp b/webkit/compositor_bindings/WebLayerTest.cpp
index 36571d3835f02d13ee8ddc4e2b9d942efe354f69..193128f78b1d60cdbeb130557be2a64c33ff73b0 100644
--- a/webkit/compositor_bindings/WebLayerTest.cpp
+++ b/webkit/compositor_bindings/WebLayerTest.cpp
@@ -7,10 +7,12 @@
#include "cc/test/compositor_fake_web_graphics_context_3d.h"
#include "cc/test/web_compositor_initializer.h"
+#include "SkBitmap.h"
#include "WebLayerImpl.h"
#include "WebLayerTreeViewTestCommon.h"
#include <public/WebContentLayer.h>
#include <public/WebContentLayerClient.h>
+#include <public/WebDecorationLayer.h>
#include <public/WebExternalTextureLayer.h>
#include <public/WebFloatPoint.h>
#include <public/WebFloatRect.h>
@@ -162,6 +164,16 @@ TEST_F(WebLayerTest, Client)
m_rootLayer->addChild(solidColorLayer->layer());
Mock::VerifyAndClearExpectations(&m_client);
+ // Decoration layer.
+ EXPECT_CALL(m_client, scheduleComposite()).Times(AtLeast(1));
+ OwnPtr<WebDecorationLayer> decorationLayer = adoptPtr(WebDecorationLayer::create());
+ m_rootLayer->addChild(decorationLayer->layer());
+ Mock::VerifyAndClearExpectations(&m_client);
+
+ EXPECT_CALL(m_client, scheduleComposite()).Times(AtLeast(1));
+ SkBitmap bitmap;
+ decorationLayer->setBitmap(bitmap, WebRect(10, 10, 5, 5));
+ Mock::VerifyAndClearExpectations(&m_client);
}
class MockScrollClient : public WebLayerScrollClient {
« no previous file with comments | « webkit/compositor_bindings/WebDecorationLayerImpl.cpp ('k') | webkit/compositor_bindings/compositor_bindings.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698