summaryrefslogtreecommitdiffstats
path: root/cc/test
diff options
context:
space:
mode:
authorenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-16 20:32:13 +0000
committerenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-16 20:32:13 +0000
commit009dc0702a605ca63363a7b6fe28dd490cf31f3c (patch)
tree06e4d9d3781498d8d9fa1bdc9a7ab11eba59137a /cc/test
parentaec65a0ea722bbf5a5b54c3ee6da21c95ad4dd84 (diff)
downloadchromium_src-009dc0702a605ca63363a7b6fe28dd490cf31f3c.zip
chromium_src-009dc0702a605ca63363a7b6fe28dd490cf31f3c.tar.gz
chromium_src-009dc0702a605ca63363a7b6fe28dd490cf31f3c.tar.bz2
cc: Unify namespaces for all test files
All cc test harnesses now live in the cc namespace. Any cc unittest or pixeltest itself is in an anonymous namespace under cc. This patch removes all instances of the WebKitTest namespace from cc. R=jamesr@chromium.org BUG=none Review URL: https://chromiumcodereview.appspot.com/11474050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test')
-rw-r--r--cc/test/animation_test_common.cc6
-rw-r--r--cc/test/cc_test_suite.cc2
-rw-r--r--cc/test/cc_test_suite.h2
-rw-r--r--cc/test/compositor_fake_web_graphics_context_3d.cc36
-rw-r--r--cc/test/compositor_fake_web_graphics_context_3d.h14
-rw-r--r--cc/test/fake_content_layer_client.cc4
-rw-r--r--cc/test/fake_content_layer_client.h4
-rw-r--r--cc/test/fake_graphics_context_3d_unittest.cc6
-rw-r--r--cc/test/fake_layer_tree_host_client.cc8
-rw-r--r--cc/test/fake_layer_tree_host_client.h4
-rw-r--r--cc/test/fake_output_surface.h2
-rw-r--r--cc/test/fake_picture_layer_tiling_client.cc2
-rw-r--r--cc/test/fake_proxy.cc2
-rw-r--r--cc/test/fake_web_compositor_output_surface.cc48
-rw-r--r--cc/test/fake_web_compositor_software_output_device.cc39
-rw-r--r--cc/test/fake_web_graphics_context_3d.cc222
-rw-r--r--cc/test/fake_web_graphics_context_3d.h394
-rw-r--r--cc/test/fake_web_graphics_context_3d_unittest.cc8
-rw-r--r--cc/test/fake_web_scrollbar_theme_geometry.cc91
-rw-r--r--cc/test/fake_web_scrollbar_theme_geometry.h54
-rw-r--r--cc/test/geometry_test_utils.cc4
-rw-r--r--cc/test/geometry_test_utils.h6
-rw-r--r--cc/test/layer_test_common.cc2
-rw-r--r--cc/test/layer_test_common.h3
-rw-r--r--cc/test/layer_tree_test_common.cc10
-rw-r--r--cc/test/layer_tree_test_common.h48
-rw-r--r--cc/test/mock_quad_culler.cc2
-rw-r--r--cc/test/occlusion_tracker_test_common.h4
-rw-r--r--cc/test/paths.cc2
-rw-r--r--cc/test/paths.h2
-rw-r--r--cc/test/pixel_test_output_surface.h1
-rw-r--r--cc/test/pixel_test_utils.cc3
-rw-r--r--cc/test/pixel_test_utils.h7
-rw-r--r--cc/test/render_pass_test_common.cc6
-rw-r--r--cc/test/render_pass_test_common.h4
-rw-r--r--cc/test/render_pass_test_utils.cc2
-rw-r--r--cc/test/render_pass_test_utils.h13
-rw-r--r--cc/test/run_all_unittests.cc2
-rw-r--r--cc/test/scheduler_test_common.cc4
-rw-r--r--cc/test/scheduler_test_common.h4
-rw-r--r--cc/test/tiled_layer_test_common.cc2
-rw-r--r--cc/test/tiled_layer_test_common.h3
42 files changed, 747 insertions, 335 deletions
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
index b6ba614..62b0de8 100644
--- a/cc/test/animation_test_common.cc
+++ b/cc/test/animation_test_common.cc
@@ -19,7 +19,7 @@ using cc::KeyframedTransformAnimationCurve;
using cc::TimingFunction;
using cc::TransformKeyframe;
-namespace {
+namespace cc {
static int nextAnimationId = 0;
@@ -68,10 +68,6 @@ int addAnimatedTransform(Target& target, double duration, int deltaX, int deltaY
return id;
}
-} // namespace
-
-namespace cc {
-
FakeFloatAnimationCurve::FakeFloatAnimationCurve()
: m_duration(1)
{
diff --git a/cc/test/cc_test_suite.cc b/cc/test/cc_test_suite.cc
index 9a43681..c9d48b7 100644
--- a/cc/test/cc_test_suite.cc
+++ b/cc/test/cc_test_suite.cc
@@ -8,7 +8,6 @@
#include "cc/test/paths.h"
namespace cc {
-namespace test {
CCTestSuite::CCTestSuite(int argc, char** argv)
: base::TestSuite(argc, argv) {}
@@ -27,5 +26,4 @@ void CCTestSuite::Shutdown() {
base::TestSuite::Shutdown();
}
-} // namespace test
} // namespace cc
diff --git a/cc/test/cc_test_suite.h b/cc/test/cc_test_suite.h
index 5cdf958..0d1ca4f 100644
--- a/cc/test/cc_test_suite.h
+++ b/cc/test/cc_test_suite.h
@@ -12,7 +12,6 @@
class MessageLoop;
namespace cc {
-namespace test {
class CCTestSuite : public base::TestSuite {
public:
@@ -30,7 +29,6 @@ class CCTestSuite : public base::TestSuite {
DISALLOW_COPY_AND_ASSIGN(CCTestSuite);
};
-} // namespace test
} // namespace cc
#endif // CC_TEST_CC_TEST_SUITE_H_
diff --git a/cc/test/compositor_fake_web_graphics_context_3d.cc b/cc/test/compositor_fake_web_graphics_context_3d.cc
new file mode 100644
index 0000000..99d6cdd
--- /dev/null
+++ b/cc/test/compositor_fake_web_graphics_context_3d.cc
@@ -0,0 +1,36 @@
+// Copyright 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/test/compositor_fake_web_graphics_context_3d.h"
+
+namespace cc {
+
+bool CompositorFakeWebGraphicsContext3D::makeContextCurrent() {
+ return true;
+}
+
+WebKit::WebGLId CompositorFakeWebGraphicsContext3D::createProgram() {
+ return 1;
+}
+
+WebKit::WebGLId CompositorFakeWebGraphicsContext3D::createShader(
+ WebKit::WGC3Denum) {
+ return 1;
+}
+
+void CompositorFakeWebGraphicsContext3D::getShaderiv(
+ WebKit::WebGLId,
+ WebKit::WGC3Denum,
+ WebKit::WGC3Dint* value) {
+ *value = 1;
+}
+
+void CompositorFakeWebGraphicsContext3D::getProgramiv(
+ WebKit::WebGLId,
+ WebKit::WGC3Denum,
+ WebKit::WGC3Dint* value) {
+ *value = 1;
+}
+
+} // namespace cc
diff --git a/cc/test/compositor_fake_web_graphics_context_3d.h b/cc/test/compositor_fake_web_graphics_context_3d.h
index 7a9c496..e54666e 100644
--- a/cc/test/compositor_fake_web_graphics_context_3d.h
+++ b/cc/test/compositor_fake_web_graphics_context_3d.h
@@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "cc/test/fake_web_graphics_context_3d.h"
-namespace WebKit {
+namespace cc {
// Test stub for WebGraphicsContext3D. Returns canned values needed for compositor initialization.
class CompositorFakeWebGraphicsContext3D : public FakeWebGraphicsContext3D {
@@ -18,11 +18,11 @@ public:
return make_scoped_ptr(new CompositorFakeWebGraphicsContext3D(attrs));
}
- virtual bool makeContextCurrent() { return true; }
- virtual WebGLId createProgram() { return 1; }
- virtual WebGLId createShader(WGC3Denum) { return 1; }
- virtual void getShaderiv(WebGLId, WGC3Denum, WGC3Dint* value) { *value = 1; }
- virtual void getProgramiv(WebGLId, WGC3Denum, WGC3Dint* value) { *value = 1; }
+ virtual bool makeContextCurrent();
+ virtual WebKit::WebGLId createProgram();
+ virtual WebKit::WebGLId createShader(WebKit::WGC3Denum);
+ virtual void getShaderiv(WebKit::WebGLId, WebKit::WGC3Denum, WebKit::WGC3Dint* value);
+ virtual void getProgramiv(WebKit::WebGLId, WebKit::WGC3Denum, WebKit::WGC3Dint* value);
protected:
explicit CompositorFakeWebGraphicsContext3D(Attributes attrs)
@@ -31,6 +31,6 @@ protected:
}
};
-}
+} // namespace cc
#endif // CC_TEST_COMPOSITOR_FAKE_WEB_GRAPHICS_CONTEXT_3D_H_
diff --git a/cc/test/fake_content_layer_client.cc b/cc/test/fake_content_layer_client.cc
index 8f91663..113ac5a 100644
--- a/cc/test/fake_content_layer_client.cc
+++ b/cc/test/fake_content_layer_client.cc
@@ -6,7 +6,7 @@
#include "ui/gfx/rect.h"
-namespace WebKitTests {
+namespace cc {
FakeContentLayerClient::FakeContentLayerClient()
: m_paintAllOpaque(false)
@@ -19,4 +19,4 @@ void FakeContentLayerClient::paintContents(SkCanvas*, const gfx::Rect& rect, gfx
opaqueRect = rect;
}
-} // namespace WebKitTests
+} // namespace cc
diff --git a/cc/test/fake_content_layer_client.h b/cc/test/fake_content_layer_client.h
index b7011cc..85ab26e 100644
--- a/cc/test/fake_content_layer_client.h
+++ b/cc/test/fake_content_layer_client.h
@@ -8,7 +8,7 @@
#include "base/compiler_specific.h"
#include "cc/content_layer_client.h"
-namespace WebKitTests {
+namespace cc {
class FakeContentLayerClient : public cc::ContentLayerClient {
public:
@@ -22,6 +22,6 @@ private:
bool m_paintAllOpaque;
};
-} // namespace WebKitTests
+} // namespace cc
#endif // CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_
diff --git a/cc/test/fake_graphics_context_3d_unittest.cc b/cc/test/fake_graphics_context_3d_unittest.cc
index bea0bdf..01f1fbf 100644
--- a/cc/test/fake_graphics_context_3d_unittest.cc
+++ b/cc/test/fake_graphics_context_3d_unittest.cc
@@ -8,6 +8,9 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+namespace cc {
+namespace {
+
class ContextThatCountsMakeCurrents : public WebKit::FakeWebGraphicsContext3D {
public:
ContextThatCountsMakeCurrents() : m_makeCurrentCount(0) { }
@@ -29,3 +32,6 @@ TEST(FakeGraphicsContext3DTest, ContextCreationShouldNotMakeCurrent)
EXPECT_TRUE(context.get());
EXPECT_EQ(0, context->makeCurrentCount());
}
+
+} // namespace
+} // namespace cc
diff --git a/cc/test/fake_layer_tree_host_client.cc b/cc/test/fake_layer_tree_host_client.cc
index a34f800..e4f3b49 100644
--- a/cc/test/fake_layer_tree_host_client.cc
+++ b/cc/test/fake_layer_tree_host_client.cc
@@ -17,9 +17,9 @@ scoped_ptr<OutputSurface> FakeLayerImplTreeHostClient::createOutputSurface()
WebKit::WebGraphicsContext3D::Attributes attrs;
if (m_useDelegatingRenderer)
- return FakeOutputSurface::CreateDelegating3d(WebKit::CompositorFakeWebGraphicsContext3D::create(attrs).PassAs<WebKit::WebGraphicsContext3D>()).PassAs<OutputSurface>();
+ return FakeOutputSurface::CreateDelegating3d(CompositorFakeWebGraphicsContext3D::create(attrs).PassAs<WebKit::WebGraphicsContext3D>()).PassAs<OutputSurface>();
- return FakeOutputSurface::Create3d(WebKit::CompositorFakeWebGraphicsContext3D::create(attrs).PassAs<WebKit::WebGraphicsContext3D>()).PassAs<OutputSurface>();
+ return FakeOutputSurface::Create3d(CompositorFakeWebGraphicsContext3D::create(attrs).PassAs<WebKit::WebGraphicsContext3D>()).PassAs<OutputSurface>();
}
scoped_ptr<InputHandler> FakeLayerImplTreeHostClient::createInputHandler()
@@ -29,7 +29,7 @@ scoped_ptr<InputHandler> FakeLayerImplTreeHostClient::createInputHandler()
scoped_ptr<FontAtlas> FakeLayerImplTreeHostClient::createFontAtlas()
{
- return scoped_ptr<FontAtlas>();
+ return scoped_ptr<FontAtlas>();
}
-}
+} // namespace cc
diff --git a/cc/test/fake_layer_tree_host_client.h b/cc/test/fake_layer_tree_host_client.h
index 9e5cdfcb..1741d15 100644
--- a/cc/test/fake_layer_tree_host_client.h
+++ b/cc/test/fake_layer_tree_host_client.h
@@ -1,6 +1,7 @@
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+
#ifndef CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_
#define CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_
@@ -45,5 +46,6 @@ private:
bool m_useDelegatingRenderer;
};
-}
+} // namespace cc
+
#endif // CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
index f21e058..7c5e04a 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -64,7 +64,7 @@ private:
static inline scoped_ptr<cc::OutputSurface> createFakeOutputSurface()
{
return FakeOutputSurface::Create3d(
- WebKit::CompositorFakeWebGraphicsContext3D::create(
+ CompositorFakeWebGraphicsContext3D::create(
WebKit::WebGraphicsContext3D::Attributes())
.PassAs<WebKit::WebGraphicsContext3D>())
.PassAs<cc::OutputSurface>();
diff --git a/cc/test/fake_picture_layer_tiling_client.cc b/cc/test/fake_picture_layer_tiling_client.cc
index c86abb0..4e2ee00 100644
--- a/cc/test/fake_picture_layer_tiling_client.cc
+++ b/cc/test/fake_picture_layer_tiling_client.cc
@@ -29,4 +29,4 @@ void FakePictureLayerTilingClient::SetTileSize(gfx::Size tile_size) {
tile_size_ = tile_size;
}
-}
+} // namespace cc
diff --git a/cc/test/fake_proxy.cc b/cc/test/fake_proxy.cc
index df2c072..92743b8 100644
--- a/cc/test/fake_proxy.cc
+++ b/cc/test/fake_proxy.cc
@@ -57,4 +57,4 @@ void FakeProxy::setMaxPartialTextureUpdates(size_t max)
}
-} // namespace cc
+} // namespace cc
diff --git a/cc/test/fake_web_compositor_output_surface.cc b/cc/test/fake_web_compositor_output_surface.cc
new file mode 100644
index 0000000..7194bf7
--- /dev/null
+++ b/cc/test/fake_web_compositor_output_surface.cc
@@ -0,0 +1,48 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/test/fake_web_compositor_output_surface.h"
+
+namespace cc {
+
+FakeWebCompositorOutputSurface::FakeWebCompositorOutputSurface(
+ scoped_ptr<WebKit::WebGraphicsContext3D> context3D) {
+ m_context3D = context3D.Pass();
+}
+
+FakeWebCompositorOutputSurface::FakeWebCompositorOutputSurface(
+ scoped_ptr<WebKit::WebCompositorSoftwareOutputDevice> softwareDevice) {
+ m_softwareDevice = softwareDevice.Pass();
+}
+
+FakeWebCompositorOutputSurface::~FakeWebCompositorOutputSurface() {
+}
+
+bool FakeWebCompositorOutputSurface::bindToClient(
+ WebKit::WebCompositorOutputSurfaceClient* client) {
+ if (!m_context3D)
+ return true;
+ DCHECK(client);
+ if (!m_context3D->makeContextCurrent())
+ return false;
+ m_client = client;
+ return true;
+}
+
+const FakeWebCompositorOutputSurface::Capabilities&
+ FakeWebCompositorOutputSurface::capabilities() const {
+ return m_capabilities;
+}
+
+WebKit::WebGraphicsContext3D*
+ FakeWebCompositorOutputSurface::context3D() const {
+ return m_context3D.get();
+}
+
+WebKit::WebCompositorSoftwareOutputDevice*
+ FakeWebCompositorOutputSurface::softwareDevice() const {
+ return m_softwareDevice.get();
+}
+
+} // namespace cc
diff --git a/cc/test/fake_web_compositor_software_output_device.cc b/cc/test/fake_web_compositor_software_output_device.cc
new file mode 100644
index 0000000..15385b5
--- /dev/null
+++ b/cc/test/fake_web_compositor_software_output_device.cc
@@ -0,0 +1,39 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/test/fake_web_compositor_software_output_device.h"
+
+namespace cc {
+
+FakeWebCompositorSoftwareOutputDevice::FakeWebCompositorSoftwareOutputDevice() {
+}
+
+FakeWebCompositorSoftwareOutputDevice::
+ ~FakeWebCompositorSoftwareOutputDevice() {
+}
+
+WebKit::WebImage* FakeWebCompositorSoftwareOutputDevice::lock(bool forWrite) {
+ DCHECK(m_device.get());
+ m_image = m_device->accessBitmap(forWrite);
+ return &m_image;
+}
+
+void FakeWebCompositorSoftwareOutputDevice::unlock() {
+ m_image.reset();
+}
+
+void FakeWebCompositorSoftwareOutputDevice::didChangeViewportSize(
+ WebKit::WebSize size) {
+ if (m_device.get() && size.width == m_device->width() &&
+ size.height == m_device->height())
+ return;
+
+ m_device.reset(new SkDevice(
+ SkBitmap::kARGB_8888_Config,
+ size.width,
+ size.height,
+ true));
+}
+
+} // namespace cc
diff --git a/cc/test/fake_web_graphics_context_3d.cc b/cc/test/fake_web_graphics_context_3d.cc
new file mode 100644
index 0000000..52c765d
--- /dev/null
+++ b/cc/test/fake_web_graphics_context_3d.cc
@@ -0,0 +1,222 @@
+// Copyright 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/test/fake_web_graphics_context_3d.h"
+
+namespace cc {
+
+bool FakeWebGraphicsContext3D::makeContextCurrent() {
+ return true;
+}
+
+int FakeWebGraphicsContext3D::width() {
+ return 0;
+}
+
+int FakeWebGraphicsContext3D::height() {
+ return 0;
+}
+
+bool FakeWebGraphicsContext3D::isGLES2Compliant() {
+ return false;
+}
+
+bool FakeWebGraphicsContext3D::readBackFramebuffer(
+ unsigned char* pixels,
+ size_t bufferSize,
+ WebKit::WebGLId framebuffer,
+ int width,
+ int height) {
+ return false;
+}
+
+WebKit::WebGLId FakeWebGraphicsContext3D::getPlatformTextureId() {
+ return 0;
+}
+
+bool FakeWebGraphicsContext3D::isContextLost() {
+ return false;
+}
+
+void* FakeWebGraphicsContext3D::mapBufferSubDataCHROMIUM(
+ WebKit::WGC3Denum target,
+ WebKit::WGC3Dintptr offset,
+ WebKit::WGC3Dsizeiptr size,
+ WebKit::WGC3Denum access) {
+ return 0;
+}
+
+void* FakeWebGraphicsContext3D::mapTexSubImage2DCHROMIUM(
+ WebKit::WGC3Denum target,
+ WebKit::WGC3Dint level,
+ WebKit::WGC3Dint xoffset,
+ WebKit::WGC3Dint yoffset,
+ WebKit::WGC3Dsizei width,
+ WebKit::WGC3Dsizei height,
+ WebKit::WGC3Denum format,
+ WebKit::WGC3Denum type,
+ WebKit::WGC3Denum access) {
+ return 0;
+}
+
+WebKit::WebString FakeWebGraphicsContext3D::getRequestableExtensionsCHROMIUM() {
+ return WebKit::WebString();
+}
+
+WebKit::WGC3Denum FakeWebGraphicsContext3D::checkFramebufferStatus(
+ WebKit::WGC3Denum target) {
+ return GL_FRAMEBUFFER_COMPLETE;
+}
+
+bool FakeWebGraphicsContext3D::getActiveAttrib(
+ WebKit::WebGLId program,
+ WebKit::WGC3Duint index,
+ ActiveInfo&) {
+ return false;
+}
+
+bool FakeWebGraphicsContext3D::getActiveUniform(
+ WebKit::WebGLId program,
+ WebKit::WGC3Duint index,
+ ActiveInfo&) {
+ return false;
+}
+
+WebKit::WGC3Dint FakeWebGraphicsContext3D::getAttribLocation(
+ WebKit::WebGLId program,
+ const WebKit::WGC3Dchar* name) {
+ return 0;
+}
+
+WebKit::WebGraphicsContext3D::Attributes
+ FakeWebGraphicsContext3D::getContextAttributes() {
+ return m_attrs;
+}
+
+WebKit::WGC3Denum FakeWebGraphicsContext3D::getError() {
+ return 0;
+}
+
+void FakeWebGraphicsContext3D::getIntegerv(
+ WebKit::WGC3Denum pname,
+ WebKit::WGC3Dint* value) {
+ if (pname == GL_MAX_TEXTURE_SIZE)
+ *value = 1024;
+}
+
+void FakeWebGraphicsContext3D::getProgramiv(
+ WebKit::WebGLId program,
+ WebKit::WGC3Denum pname,
+ WebKit::WGC3Dint* value) {
+ if (pname == GL_LINK_STATUS)
+ *value = 1;
+}
+
+WebKit::WebString FakeWebGraphicsContext3D::getProgramInfoLog(
+ WebKit::WebGLId program) {
+ return WebKit::WebString();
+}
+
+void FakeWebGraphicsContext3D::getShaderiv(
+ WebKit::WebGLId shader,
+ WebKit::WGC3Denum pname,
+ WebKit::WGC3Dint* value) {
+ if (pname == GL_COMPILE_STATUS)
+ *value = 1;
+}
+
+WebKit::WebString FakeWebGraphicsContext3D::getShaderInfoLog(
+ WebKit::WebGLId shader) {
+ return WebKit::WebString();
+}
+
+WebKit::WebString FakeWebGraphicsContext3D::getShaderSource(
+ WebKit::WebGLId shader) {
+ return WebKit::WebString();
+}
+
+WebKit::WebString FakeWebGraphicsContext3D::getString(WebKit::WGC3Denum name) {
+ return WebKit::WebString();
+}
+
+WebKit::WGC3Dint FakeWebGraphicsContext3D::getUniformLocation(
+ WebKit::WebGLId program,
+ const WebKit::WGC3Dchar* name) {
+ return 0;
+}
+
+WebKit::WGC3Dsizeiptr FakeWebGraphicsContext3D::getVertexAttribOffset(
+ WebKit::WGC3Duint index,
+ WebKit::WGC3Denum pname) {
+ return 0;
+}
+
+WebKit::WGC3Dboolean FakeWebGraphicsContext3D::isBuffer(
+ WebKit::WebGLId buffer) {
+ return false;
+}
+
+WebKit::WGC3Dboolean FakeWebGraphicsContext3D::isEnabled(
+ WebKit::WGC3Denum cap) {
+ return false;
+}
+
+WebKit::WGC3Dboolean FakeWebGraphicsContext3D::isFramebuffer(
+ WebKit::WebGLId framebuffer) {
+ return false;
+}
+
+WebKit::WGC3Dboolean FakeWebGraphicsContext3D::isProgram(
+ WebKit::WebGLId program) {
+ return false;
+}
+
+WebKit::WGC3Dboolean FakeWebGraphicsContext3D::isRenderbuffer(
+ WebKit::WebGLId renderbuffer) {
+ return false;
+}
+
+WebKit::WGC3Dboolean FakeWebGraphicsContext3D::isShader(
+ WebKit::WebGLId shader) {
+ return false;
+}
+
+WebKit::WGC3Dboolean FakeWebGraphicsContext3D::isTexture(
+ WebKit::WebGLId texture) {
+ return false;
+}
+
+WebKit::WebGLId FakeWebGraphicsContext3D::createBuffer() {
+ return 1;
+}
+
+WebKit::WebGLId FakeWebGraphicsContext3D::createFramebuffer() {
+ return 1;
+}
+
+WebKit::WebGLId FakeWebGraphicsContext3D::createProgram() {
+ return 1;
+}
+
+WebKit::WebGLId FakeWebGraphicsContext3D::createRenderbuffer() {
+ return 1;
+}
+
+WebKit::WebGLId FakeWebGraphicsContext3D::createShader(WebKit::WGC3Denum) {
+ return 1;
+}
+
+WebKit::WebGLId FakeWebGraphicsContext3D::createTexture() {
+ return m_nextTextureId++;
+}
+
+WebKit::WebGLId FakeWebGraphicsContext3D::createQueryEXT() {
+ return 1;
+}
+
+WebKit::WGC3Dboolean FakeWebGraphicsContext3D::isQueryEXT(WebKit::WebGLId) {
+ return true;
+}
+
+} // namespace cc
diff --git a/cc/test/fake_web_graphics_context_3d.h b/cc/test/fake_web_graphics_context_3d.h
index bb8e893..8ef6cb97 100644
--- a/cc/test/fake_web_graphics_context_3d.h
+++ b/cc/test/fake_web_graphics_context_3d.h
@@ -8,253 +8,239 @@
#include "third_party/khronos/GLES2/gl2.h"
#include <public/WebGraphicsContext3D.h>
-namespace WebKit {
+namespace cc {
// WebGraphicsContext3D base class for use in WebKit unit tests.
// All operations are no-ops (returning 0 if necessary).
-class FakeWebGraphicsContext3D : public WebGraphicsContext3D {
+class FakeWebGraphicsContext3D : public WebKit::WebGraphicsContext3D {
public:
FakeWebGraphicsContext3D()
: m_nextTextureId(1)
{
}
- virtual bool makeContextCurrent() { return true; }
+ virtual bool makeContextCurrent();
- virtual int width() { return 0; }
- virtual int height() { return 0; }
+ virtual int width();
+ virtual int height();
virtual void reshape(int width, int height) { }
- virtual bool isGLES2Compliant() { return false; }
+ virtual bool isGLES2Compliant();
- virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize, WebGLId framebuffer, int width, int height) { return false; }
+ virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize, WebKit::WebGLId framebuffer, int width, int height);
- virtual WebGLId getPlatformTextureId() { return 0; }
+ virtual WebKit::WebGLId getPlatformTextureId();
virtual void prepareTexture() { }
virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) { }
- virtual void synthesizeGLError(WGC3Denum) { }
+ virtual void synthesizeGLError(WebKit::WGC3Denum) { }
- virtual bool isContextLost() { return false; }
+ virtual bool isContextLost();
+
+ virtual void* mapBufferSubDataCHROMIUM(WebKit::WGC3Denum target, WebKit::WGC3Dintptr offset, WebKit::WGC3Dsizeiptr size, WebKit::WGC3Denum access);
- virtual void* mapBufferSubDataCHROMIUM(WGC3Denum target, WGC3Dintptr offset, WGC3Dsizeiptr size, WGC3Denum access) { return 0; }
virtual void unmapBufferSubDataCHROMIUM(const void*) { }
- virtual void* mapTexSubImage2DCHROMIUM(WGC3Denum target, WGC3Dint level, WGC3Dint xoffset, WGC3Dint yoffset, WGC3Dsizei width, WGC3Dsizei height, WGC3Denum format, WGC3Denum type, WGC3Denum access) { return 0; }
+ virtual void* mapTexSubImage2DCHROMIUM(WebKit::WGC3Denum target, WebKit::WGC3Dint level, WebKit::WGC3Dint xoffset, WebKit::WGC3Dint yoffset, WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height, WebKit::WGC3Denum format, WebKit::WGC3Denum type, WebKit::WGC3Denum access);
virtual void unmapTexSubImage2DCHROMIUM(const void*) { }
virtual void setVisibilityCHROMIUM(bool visible) { }
- virtual void discardFramebufferEXT(WGC3Denum target, WGC3Dsizei numAttachments, const WGC3Denum* attachments) { }
+ virtual void discardFramebufferEXT(WebKit::WGC3Denum target, WebKit::WGC3Dsizei numAttachments, const WebKit::WGC3Denum* attachments) { }
virtual void ensureFramebufferCHROMIUM() { }
virtual void setMemoryAllocationChangedCallbackCHROMIUM(WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* callback) { }
- virtual WebString getRequestableExtensionsCHROMIUM() { return WebString(); }
+ virtual WebKit::WebString getRequestableExtensionsCHROMIUM();
virtual void requestExtensionCHROMIUM(const char*) { }
- virtual void blitFramebufferCHROMIUM(WGC3Dint srcX0, WGC3Dint srcY0, WGC3Dint srcX1, WGC3Dint srcY1, WGC3Dint dstX0, WGC3Dint dstY0, WGC3Dint dstX1, WGC3Dint dstY1, WGC3Dbitfield mask, WGC3Denum filter) { }
- virtual void renderbufferStorageMultisampleCHROMIUM(WGC3Denum target, WGC3Dsizei samples, WGC3Denum internalformat, WGC3Dsizei width, WGC3Dsizei height) { }
-
- virtual void activeTexture(WGC3Denum texture) { }
- virtual void attachShader(WebGLId program, WebGLId shader) { }
- virtual void bindAttribLocation(WebGLId program, WGC3Duint index, const WGC3Dchar* name) { }
- virtual void bindBuffer(WGC3Denum target, WebGLId buffer) { }
- virtual void bindFramebuffer(WGC3Denum target, WebGLId framebuffer) { }
- virtual void bindRenderbuffer(WGC3Denum target, WebGLId renderbuffer) { }
- virtual void bindTexture(WGC3Denum target, WebGLId texture) { }
- virtual void blendColor(WGC3Dclampf red, WGC3Dclampf green, WGC3Dclampf blue, WGC3Dclampf alpha) { }
- virtual void blendEquation(WGC3Denum mode) { }
- virtual void blendEquationSeparate(WGC3Denum modeRGB, WGC3Denum modeAlpha) { }
- virtual void blendFunc(WGC3Denum sfactor, WGC3Denum dfactor) { }
- virtual void blendFuncSeparate(WGC3Denum srcRGB, WGC3Denum dstRGB, WGC3Denum srcAlpha, WGC3Denum dstAlpha) { }
-
- virtual void bufferData(WGC3Denum target, WGC3Dsizeiptr size, const void* data, WGC3Denum usage) { }
- virtual void bufferSubData(WGC3Denum target, WGC3Dintptr offset, WGC3Dsizeiptr size, const void* data) { }
-
- virtual WGC3Denum checkFramebufferStatus(WGC3Denum target)
- {
- return GL_FRAMEBUFFER_COMPLETE;
- }
-
- virtual void clear(WGC3Dbitfield mask) { }
- virtual void clearColor(WGC3Dclampf red, WGC3Dclampf green, WGC3Dclampf blue, WGC3Dclampf alpha) { }
- virtual void clearDepth(WGC3Dclampf depth) { }
- virtual void clearStencil(WGC3Dint s) { }
- virtual void colorMask(WGC3Dboolean red, WGC3Dboolean green, WGC3Dboolean blue, WGC3Dboolean alpha) { }
- virtual void compileShader(WebGLId shader) { }
-
- virtual void compressedTexImage2D(WGC3Denum target, WGC3Dint level, WGC3Denum internalformat, WGC3Dsizei width, WGC3Dsizei height, WGC3Dint border, WGC3Dsizei imageSize, const void* data) { }
- virtual void compressedTexSubImage2D(WGC3Denum target, WGC3Dint level, WGC3Dint xoffset, WGC3Dint yoffset, WGC3Dsizei width, WGC3Dsizei height, WGC3Denum format, WGC3Dsizei imageSize, const void* data) { }
- virtual void copyTexImage2D(WGC3Denum target, WGC3Dint level, WGC3Denum internalformat, WGC3Dint x, WGC3Dint y, WGC3Dsizei width, WGC3Dsizei height, WGC3Dint border) { }
- virtual void copyTexSubImage2D(WGC3Denum target, WGC3Dint level, WGC3Dint xoffset, WGC3Dint yoffset, WGC3Dint x, WGC3Dint y, WGC3Dsizei width, WGC3Dsizei height) { }
- virtual void cullFace(WGC3Denum mode) { }
- virtual void depthFunc(WGC3Denum func) { }
- virtual void depthMask(WGC3Dboolean flag) { }
- virtual void depthRange(WGC3Dclampf zNear, WGC3Dclampf zFar) { }
- virtual void detachShader(WebGLId program, WebGLId shader) { }
- virtual void disable(WGC3Denum cap) { }
- virtual void disableVertexAttribArray(WGC3Duint index) { }
- virtual void drawArrays(WGC3Denum mode, WGC3Dint first, WGC3Dsizei count) { }
- virtual void drawElements(WGC3Denum mode, WGC3Dsizei count, WGC3Denum type, WGC3Dintptr offset) { }
-
- virtual void enable(WGC3Denum cap) { }
- virtual void enableVertexAttribArray(WGC3Duint index) { }
+ virtual void blitFramebufferCHROMIUM(WebKit::WGC3Dint srcX0, WebKit::WGC3Dint srcY0, WebKit::WGC3Dint srcX1, WebKit::WGC3Dint srcY1, WebKit::WGC3Dint dstX0, WebKit::WGC3Dint dstY0, WebKit::WGC3Dint dstX1, WebKit::WGC3Dint dstY1, WebKit::WGC3Dbitfield mask, WebKit::WGC3Denum filter) { }
+ virtual void renderbufferStorageMultisampleCHROMIUM(WebKit::WGC3Denum target, WebKit::WGC3Dsizei samples, WebKit::WGC3Denum internalformat, WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height) { }
+
+ virtual void activeTexture(WebKit::WGC3Denum texture) { }
+ virtual void attachShader(WebKit::WebGLId program, WebKit::WebGLId shader) { }
+ virtual void bindAttribLocation(WebKit::WebGLId program, WebKit::WGC3Duint index, const WebKit::WGC3Dchar* name) { }
+ virtual void bindBuffer(WebKit::WGC3Denum target, WebKit::WebGLId buffer) { }
+ virtual void bindFramebuffer(WebKit::WGC3Denum target, WebKit::WebGLId framebuffer) { }
+ virtual void bindRenderbuffer(WebKit::WGC3Denum target, WebKit::WebGLId renderbuffer) { }
+ virtual void bindTexture(WebKit::WGC3Denum target, WebKit::WebGLId texture) { }
+ virtual void blendColor(WebKit::WGC3Dclampf red, WebKit::WGC3Dclampf green, WebKit::WGC3Dclampf blue, WebKit::WGC3Dclampf alpha) { }
+ virtual void blendEquation(WebKit::WGC3Denum mode) { }
+ virtual void blendEquationSeparate(WebKit::WGC3Denum modeRGB, WebKit::WGC3Denum modeAlpha) { }
+ virtual void blendFunc(WebKit::WGC3Denum sfactor, WebKit::WGC3Denum dfactor) { }
+ virtual void blendFuncSeparate(WebKit::WGC3Denum srcRGB, WebKit::WGC3Denum dstRGB, WebKit::WGC3Denum srcAlpha, WebKit::WGC3Denum dstAlpha) { }
+
+ virtual void bufferData(WebKit::WGC3Denum target, WebKit::WGC3Dsizeiptr size, const void* data, WebKit::WGC3Denum usage) { }
+ virtual void bufferSubData(WebKit::WGC3Denum target, WebKit::WGC3Dintptr offset, WebKit::WGC3Dsizeiptr size, const void* data) { }
+
+ virtual WebKit::WGC3Denum checkFramebufferStatus(WebKit::WGC3Denum target);
+
+ virtual void clear(WebKit::WGC3Dbitfield mask) { }
+ virtual void clearColor(WebKit::WGC3Dclampf red, WebKit::WGC3Dclampf green, WebKit::WGC3Dclampf blue, WebKit::WGC3Dclampf alpha) { }
+ virtual void clearDepth(WebKit::WGC3Dclampf depth) { }
+ virtual void clearStencil(WebKit::WGC3Dint s) { }
+ virtual void colorMask(WebKit::WGC3Dboolean red, WebKit::WGC3Dboolean green, WebKit::WGC3Dboolean blue, WebKit::WGC3Dboolean alpha) { }
+ virtual void compileShader(WebKit::WebGLId shader) { }
+
+ virtual void compressedTexImage2D(WebKit::WGC3Denum target, WebKit::WGC3Dint level, WebKit::WGC3Denum internalformat, WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height, WebKit::WGC3Dint border, WebKit::WGC3Dsizei imageSize, const void* data) { }
+ virtual void compressedTexSubImage2D(WebKit::WGC3Denum target, WebKit::WGC3Dint level, WebKit::WGC3Dint xoffset, WebKit::WGC3Dint yoffset, WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height, WebKit::WGC3Denum format, WebKit::WGC3Dsizei imageSize, const void* data) { }
+ virtual void copyTexImage2D(WebKit::WGC3Denum target, WebKit::WGC3Dint level, WebKit::WGC3Denum internalformat, WebKit::WGC3Dint x, WebKit::WGC3Dint y, WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height, WebKit::WGC3Dint border) { }
+ virtual void copyTexSubImage2D(WebKit::WGC3Denum target, WebKit::WGC3Dint level, WebKit::WGC3Dint xoffset, WebKit::WGC3Dint yoffset, WebKit::WGC3Dint x, WebKit::WGC3Dint y, WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height) { }
+ virtual void cullFace(WebKit::WGC3Denum mode) { }
+ virtual void depthFunc(WebKit::WGC3Denum func) { }
+ virtual void depthMask(WebKit::WGC3Dboolean flag) { }
+ virtual void depthRange(WebKit::WGC3Dclampf zNear, WebKit::WGC3Dclampf zFar) { }
+ virtual void detachShader(WebKit::WebGLId program, WebKit::WebGLId shader) { }
+ virtual void disable(WebKit::WGC3Denum cap) { }
+ virtual void disableVertexAttribArray(WebKit::WGC3Duint index) { }
+ virtual void drawArrays(WebKit::WGC3Denum mode, WebKit::WGC3Dint first, WebKit::WGC3Dsizei count) { }
+ virtual void drawElements(WebKit::WGC3Denum mode, WebKit::WGC3Dsizei count, WebKit::WGC3Denum type, WebKit::WGC3Dintptr offset) { }
+
+ virtual void enable(WebKit::WGC3Denum cap) { }
+ virtual void enableVertexAttribArray(WebKit::WGC3Duint index) { }
virtual void finish() { }
virtual void flush() { }
- virtual void framebufferRenderbuffer(WGC3Denum target, WGC3Denum attachment, WGC3Denum renderbuffertarget, WebGLId renderbuffer) { }
- virtual void framebufferTexture2D(WGC3Denum target, WGC3Denum attachment, WGC3Denum textarget, WebGLId texture, WGC3Dint level) { }
- virtual void frontFace(WGC3Denum mode) { }
- virtual void generateMipmap(WGC3Denum target) { }
-
- virtual bool getActiveAttrib(WebGLId program, WGC3Duint index, ActiveInfo&) { return false; }
- virtual bool getActiveUniform(WebGLId program, WGC3Duint index, ActiveInfo&) { return false; }
- virtual void getAttachedShaders(WebGLId program, WGC3Dsizei maxCount, WGC3Dsizei* count, WebGLId* shaders) { }
- virtual WGC3Dint getAttribLocation(WebGLId program, const WGC3Dchar* name) { return 0; }
- virtual void getBooleanv(WGC3Denum pname, WGC3Dboolean* value) { }
- virtual void getBufferParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Dint* value) { }
- virtual Attributes getContextAttributes() { return m_attrs; }
- virtual WGC3Denum getError() { return 0; }
- virtual void getFloatv(WGC3Denum pname, WGC3Dfloat* value) { }
- virtual void getFramebufferAttachmentParameteriv(WGC3Denum target, WGC3Denum attachment, WGC3Denum pname, WGC3Dint* value) { }
-
- virtual void getIntegerv(WGC3Denum pname, WGC3Dint* value)
- {
- if (pname == GL_MAX_TEXTURE_SIZE)
- *value = 1024;
- }
-
- virtual void getProgramiv(WebGLId program, WGC3Denum pname, WGC3Dint* value)
- {
- if (pname == GL_LINK_STATUS)
- *value = 1;
- }
-
- virtual WebString getProgramInfoLog(WebGLId program) { return WebString(); }
- virtual void getRenderbufferParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Dint* value) { }
-
- virtual void getShaderiv(WebGLId shader, WGC3Denum pname, WGC3Dint* value)
- {
- if (pname == GL_COMPILE_STATUS)
- *value = 1;
- }
-
- virtual WebString getShaderInfoLog(WebGLId shader) { return WebString(); }
- virtual void getShaderPrecisionFormat(WGC3Denum shadertype, WGC3Denum precisiontype, WGC3Dint* range, WGC3Dint* precision) { }
- virtual WebString getShaderSource(WebGLId shader) { return WebString(); }
- virtual WebString getString(WGC3Denum name) { return WebString(); }
- virtual void getTexParameterfv(WGC3Denum target, WGC3Denum pname, WGC3Dfloat* value) { }
- virtual void getTexParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Dint* value) { }
- virtual void getUniformfv(WebGLId program, WGC3Dint location, WGC3Dfloat* value) { }
- virtual void getUniformiv(WebGLId program, WGC3Dint location, WGC3Dint* value) { }
- virtual WGC3Dint getUniformLocation(WebGLId program, const WGC3Dchar* name) { return 0; }
- virtual void getVertexAttribfv(WGC3Duint index, WGC3Denum pname, WGC3Dfloat* value) { }
- virtual void getVertexAttribiv(WGC3Duint index, WGC3Denum pname, WGC3Dint* value) { }
- virtual WGC3Dsizeiptr getVertexAttribOffset(WGC3Duint index, WGC3Denum pname) { return 0; }
-
- virtual void hint(WGC3Denum target, WGC3Denum mode) { }
- virtual WGC3Dboolean isBuffer(WebGLId buffer) { return false; }
- virtual WGC3Dboolean isEnabled(WGC3Denum cap) { return false; }
- virtual WGC3Dboolean isFramebuffer(WebGLId framebuffer) { return false; }
- virtual WGC3Dboolean isProgram(WebGLId program) { return false; }
- virtual WGC3Dboolean isRenderbuffer(WebGLId renderbuffer) { return false; }
- virtual WGC3Dboolean isShader(WebGLId shader) { return false; }
- virtual WGC3Dboolean isTexture(WebGLId texture) { return false; }
- virtual void lineWidth(WGC3Dfloat) { }
- virtual void linkProgram(WebGLId program) { }
- virtual void pixelStorei(WGC3Denum pname, WGC3Dint param) { }
- virtual void polygonOffset(WGC3Dfloat factor, WGC3Dfloat units) { }
-
- virtual void readPixels(WGC3Dint x, WGC3Dint y, WGC3Dsizei width, WGC3Dsizei height, WGC3Denum format, WGC3Denum type, void* pixels) { }
+ virtual void framebufferRenderbuffer(WebKit::WGC3Denum target, WebKit::WGC3Denum attachment, WebKit::WGC3Denum renderbuffertarget, WebKit::WebGLId renderbuffer) { }
+ virtual void framebufferTexture2D(WebKit::WGC3Denum target, WebKit::WGC3Denum attachment, WebKit::WGC3Denum textarget, WebKit::WebGLId texture, WebKit::WGC3Dint level) { }
+ virtual void frontFace(WebKit::WGC3Denum mode) { }
+ virtual void generateMipmap(WebKit::WGC3Denum target) { }
+
+ virtual bool getActiveAttrib(WebKit::WebGLId program, WebKit::WGC3Duint index, ActiveInfo&);
+ virtual bool getActiveUniform(WebKit::WebGLId program, WebKit::WGC3Duint index, ActiveInfo&);
+ virtual void getAttachedShaders(WebKit::WebGLId program, WebKit::WGC3Dsizei maxCount, WebKit::WGC3Dsizei* count, WebKit::WebGLId* shaders) { }
+ virtual WebKit::WGC3Dint getAttribLocation(WebKit::WebGLId program, const WebKit::WGC3Dchar* name);
+ virtual void getBooleanv(WebKit::WGC3Denum pname, WebKit::WGC3Dboolean* value) { }
+ virtual void getBufferParameteriv(WebKit::WGC3Denum target, WebKit::WGC3Denum pname, WebKit::WGC3Dint* value) { }
+ virtual Attributes getContextAttributes();
+ virtual WebKit::WGC3Denum getError();
+ virtual void getFloatv(WebKit::WGC3Denum pname, WebKit::WGC3Dfloat* value) { }
+ virtual void getFramebufferAttachmentParameteriv(WebKit::WGC3Denum target, WebKit::WGC3Denum attachment, WebKit::WGC3Denum pname, WebKit::WGC3Dint* value) { }
+
+ virtual void getIntegerv(WebKit::WGC3Denum pname, WebKit::WGC3Dint* value);
+
+ virtual void getProgramiv(WebKit::WebGLId program, WebKit::WGC3Denum pname, WebKit::WGC3Dint* value);
+
+ virtual WebKit::WebString getProgramInfoLog(WebKit::WebGLId program);
+ virtual void getRenderbufferParameteriv(WebKit::WGC3Denum target, WebKit::WGC3Denum pname, WebKit::WGC3Dint* value) { }
+
+ virtual void getShaderiv(WebKit::WebGLId shader, WebKit::WGC3Denum pname, WebKit::WGC3Dint* value);
+
+ virtual WebKit::WebString getShaderInfoLog(WebKit::WebGLId shader);
+ virtual void getShaderPrecisionFormat(WebKit::WGC3Denum shadertype, WebKit::WGC3Denum precisiontype, WebKit::WGC3Dint* range, WebKit::WGC3Dint* precision) { }
+ virtual WebKit::WebString getShaderSource(WebKit::WebGLId shader);
+ virtual WebKit::WebString getString(WebKit::WGC3Denum name);
+ virtual void getTexParameterfv(WebKit::WGC3Denum target, WebKit::WGC3Denum pname, WebKit::WGC3Dfloat* value) { }
+ virtual void getTexParameteriv(WebKit::WGC3Denum target, WebKit::WGC3Denum pname, WebKit::WGC3Dint* value) { }
+ virtual void getUniformfv(WebKit::WebGLId program, WebKit::WGC3Dint location, WebKit::WGC3Dfloat* value) { }
+ virtual void getUniformiv(WebKit::WebGLId program, WebKit::WGC3Dint location, WebKit::WGC3Dint* value) { }
+ virtual WebKit::WGC3Dint getUniformLocation(WebKit::WebGLId program, const WebKit::WGC3Dchar* name);
+ virtual void getVertexAttribfv(WebKit::WGC3Duint index, WebKit::WGC3Denum pname, WebKit::WGC3Dfloat* value) { }
+ virtual void getVertexAttribiv(WebKit::WGC3Duint index, WebKit::WGC3Denum pname, WebKit::WGC3Dint* value) { }
+ virtual WebKit::WGC3Dsizeiptr getVertexAttribOffset(WebKit::WGC3Duint index, WebKit::WGC3Denum pname);
+
+ virtual void hint(WebKit::WGC3Denum target, WebKit::WGC3Denum mode) { }
+ virtual WebKit::WGC3Dboolean isBuffer(WebKit::WebGLId buffer);
+ virtual WebKit::WGC3Dboolean isEnabled(WebKit::WGC3Denum cap);
+ virtual WebKit::WGC3Dboolean isFramebuffer(WebKit::WebGLId framebuffer);
+ virtual WebKit::WGC3Dboolean isProgram(WebKit::WebGLId program);
+ virtual WebKit::WGC3Dboolean isRenderbuffer(WebKit::WebGLId renderbuffer);
+ virtual WebKit::WGC3Dboolean isShader(WebKit::WebGLId shader);
+ virtual WebKit::WGC3Dboolean isTexture(WebKit::WebGLId texture);
+ virtual void lineWidth(WebKit::WGC3Dfloat) { }
+ virtual void linkProgram(WebKit::WebGLId program) { }
+ virtual void pixelStorei(WebKit::WGC3Denum pname, WebKit::WGC3Dint param) { }
+ virtual void polygonOffset(WebKit::WGC3Dfloat factor, WebKit::WGC3Dfloat units) { }
+
+ virtual void readPixels(WebKit::WGC3Dint x, WebKit::WGC3Dint y, WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height, WebKit::WGC3Denum format, WebKit::WGC3Denum type, void* pixels) { }
virtual void releaseShaderCompiler() { }
- virtual void renderbufferStorage(WGC3Denum target, WGC3Denum internalformat, WGC3Dsizei width, WGC3Dsizei height) { }
- virtual void sampleCoverage(WGC3Dclampf value, WGC3Dboolean invert) { }
- virtual void scissor(WGC3Dint x, WGC3Dint y, WGC3Dsizei width, WGC3Dsizei height) { }
- virtual void shaderSource(WebGLId shader, const WGC3Dchar* string) { }
- virtual void stencilFunc(WGC3Denum func, WGC3Dint ref, WGC3Duint mask) { }
- virtual void stencilFuncSeparate(WGC3Denum face, WGC3Denum func, WGC3Dint ref, WGC3Duint mask) { }
- virtual void stencilMask(WGC3Duint mask) { }
- virtual void stencilMaskSeparate(WGC3Denum face, WGC3Duint mask) { }
- virtual void stencilOp(WGC3Denum fail, WGC3Denum zfail, WGC3Denum zpass) { }
- virtual void stencilOpSeparate(WGC3Denum face, WGC3Denum fail, WGC3Denum zfail, WGC3Denum zpass) { }
-
- virtual void texImage2D(WGC3Denum target, WGC3Dint level, WGC3Denum internalformat, WGC3Dsizei width, WGC3Dsizei height, WGC3Dint border, WGC3Denum format, WGC3Denum type, const void* pixels) { }
-
- virtual void texParameterf(WGC3Denum target, WGC3Denum pname, WGC3Dfloat param) { }
- virtual void texParameteri(WGC3Denum target, WGC3Denum pname, WGC3Dint param) { }
-
- virtual void texSubImage2D(WGC3Denum target, WGC3Dint level, WGC3Dint xoffset, WGC3Dint yoffset, WGC3Dsizei width, WGC3Dsizei height, WGC3Denum format, WGC3Denum type, const void* pixels) { }
-
- virtual void uniform1f(WGC3Dint location, WGC3Dfloat x) { }
- virtual void uniform1fv(WGC3Dint location, WGC3Dsizei count, const WGC3Dfloat* v) { }
- virtual void uniform1i(WGC3Dint location, WGC3Dint x) { }
- virtual void uniform1iv(WGC3Dint location, WGC3Dsizei count, const WGC3Dint* v) { }
- virtual void uniform2f(WGC3Dint location, WGC3Dfloat x, WGC3Dfloat y) { }
- virtual void uniform2fv(WGC3Dint location, WGC3Dsizei count, const WGC3Dfloat* v) { }
- virtual void uniform2i(WGC3Dint location, WGC3Dint x, WGC3Dint y) { }
- virtual void uniform2iv(WGC3Dint location, WGC3Dsizei count, const WGC3Dint* v) { }
- virtual void uniform3f(WGC3Dint location, WGC3Dfloat x, WGC3Dfloat y, WGC3Dfloat z) { }
- virtual void uniform3fv(WGC3Dint location, WGC3Dsizei count, const WGC3Dfloat* v) { }
- virtual void uniform3i(WGC3Dint location, WGC3Dint x, WGC3Dint y, WGC3Dint z) { }
- virtual void uniform3iv(WGC3Dint location, WGC3Dsizei count, const WGC3Dint* v) { }
- virtual void uniform4f(WGC3Dint location, WGC3Dfloat x, WGC3Dfloat y, WGC3Dfloat z, WGC3Dfloat w) { }
- virtual void uniform4fv(WGC3Dint location, WGC3Dsizei count, const WGC3Dfloat* v) { }
- virtual void uniform4i(WGC3Dint location, WGC3Dint x, WGC3Dint y, WGC3Dint z, WGC3Dint w) { }
- virtual void uniform4iv(WGC3Dint location, WGC3Dsizei count, const WGC3Dint* v) { }
- virtual void uniformMatrix2fv(WGC3Dint location, WGC3Dsizei count, WGC3Dboolean transpose, const WGC3Dfloat* value) { }
- virtual void uniformMatrix3fv(WGC3Dint location, WGC3Dsizei count, WGC3Dboolean transpose, const WGC3Dfloat* value) { }
- virtual void uniformMatrix4fv(WGC3Dint location, WGC3Dsizei count, WGC3Dboolean transpose, const WGC3Dfloat* value) { }
-
- virtual void useProgram(WebGLId program) { }
- virtual void validateProgram(WebGLId program) { }
-
- virtual void vertexAttrib1f(WGC3Duint index, WGC3Dfloat x) { }
- virtual void vertexAttrib1fv(WGC3Duint index, const WGC3Dfloat* values) { }
- virtual void vertexAttrib2f(WGC3Duint index, WGC3Dfloat x, WGC3Dfloat y) { }
- virtual void vertexAttrib2fv(WGC3Duint index, const WGC3Dfloat* values) { }
- virtual void vertexAttrib3f(WGC3Duint index, WGC3Dfloat x, WGC3Dfloat y, WGC3Dfloat z) { }
- virtual void vertexAttrib3fv(WGC3Duint index, const WGC3Dfloat* values) { }
- virtual void vertexAttrib4f(WGC3Duint index, WGC3Dfloat x, WGC3Dfloat y, WGC3Dfloat z, WGC3Dfloat w) { }
- virtual void vertexAttrib4fv(WGC3Duint index, const WGC3Dfloat* values) { }
- virtual void vertexAttribPointer(WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dboolean normalized,
- WGC3Dsizei stride, WGC3Dintptr offset) { }
-
- virtual void viewport(WGC3Dint x, WGC3Dint y, WGC3Dsizei width, WGC3Dsizei height) { }
-
- virtual WebGLId createBuffer() { return 1; }
- virtual WebGLId createFramebuffer() { return 1; }
- virtual WebGLId createProgram() { return 1; }
- virtual WebGLId createRenderbuffer() { return 1; }
- virtual WebGLId createShader(WGC3Denum) { return 1; }
- virtual WebGLId createTexture() { return m_nextTextureId++; }
-
- virtual void deleteBuffer(WebGLId) { }
- virtual void deleteFramebuffer(WebGLId) { }
- virtual void deleteProgram(WebGLId) { }
- virtual void deleteRenderbuffer(WebGLId) { }
- virtual void deleteShader(WebGLId) { }
- virtual void deleteTexture(WebGLId) { }
-
- virtual void texStorage2DEXT(WGC3Denum target, WGC3Dint levels, WGC3Duint internalformat,
- WGC3Dint width, WGC3Dint height) { }
-
- virtual WebGLId createQueryEXT() { return 1; }
- virtual void deleteQueryEXT(WebGLId) { }
- virtual WGC3Dboolean isQueryEXT(WebGLId) { return true; }
- virtual void beginQueryEXT(WGC3Denum, WebGLId) { }
- virtual void endQueryEXT(WGC3Denum) { }
- virtual void getQueryivEXT(WGC3Denum, WGC3Denum, WGC3Dint*) { }
- virtual void getQueryObjectuivEXT(WebGLId, WGC3Denum, WGC3Duint*) { }
+ virtual void renderbufferStorage(WebKit::WGC3Denum target, WebKit::WGC3Denum internalformat, WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height) { }
+ virtual void sampleCoverage(WebKit::WGC3Dclampf value, WebKit::WGC3Dboolean invert) { }
+ virtual void scissor(WebKit::WGC3Dint x, WebKit::WGC3Dint y, WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height) { }
+ virtual void shaderSource(WebKit::WebGLId shader, const WebKit::WGC3Dchar* string) { }
+ virtual void stencilFunc(WebKit::WGC3Denum func, WebKit::WGC3Dint ref, WebKit::WGC3Duint mask) { }
+ virtual void stencilFuncSeparate(WebKit::WGC3Denum face, WebKit::WGC3Denum func, WebKit::WGC3Dint ref, WebKit::WGC3Duint mask) { }
+ virtual void stencilMask(WebKit::WGC3Duint mask) { }
+ virtual void stencilMaskSeparate(WebKit::WGC3Denum face, WebKit::WGC3Duint mask) { }
+ virtual void stencilOp(WebKit::WGC3Denum fail, WebKit::WGC3Denum zfail, WebKit::WGC3Denum zpass) { }
+ virtual void stencilOpSeparate(WebKit::WGC3Denum face, WebKit::WGC3Denum fail, WebKit::WGC3Denum zfail, WebKit::WGC3Denum zpass) { }
+
+ virtual void texImage2D(WebKit::WGC3Denum target, WebKit::WGC3Dint level, WebKit::WGC3Denum internalformat, WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height, WebKit::WGC3Dint border, WebKit::WGC3Denum format, WebKit::WGC3Denum type, const void* pixels) { }
+
+ virtual void texParameterf(WebKit::WGC3Denum target, WebKit::WGC3Denum pname, WebKit::WGC3Dfloat param) { }
+ virtual void texParameteri(WebKit::WGC3Denum target, WebKit::WGC3Denum pname, WebKit::WGC3Dint param) { }
+
+ virtual void texSubImage2D(WebKit::WGC3Denum target, WebKit::WGC3Dint level, WebKit::WGC3Dint xoffset, WebKit::WGC3Dint yoffset, WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height, WebKit::WGC3Denum format, WebKit::WGC3Denum type, const void* pixels) { }
+
+ virtual void uniform1f(WebKit::WGC3Dint location, WebKit::WGC3Dfloat x) { }
+ virtual void uniform1fv(WebKit::WGC3Dint location, WebKit::WGC3Dsizei count, const WebKit::WGC3Dfloat* v) { }
+ virtual void uniform1i(WebKit::WGC3Dint location, WebKit::WGC3Dint x) { }
+ virtual void uniform1iv(WebKit::WGC3Dint location, WebKit::WGC3Dsizei count, const WebKit::WGC3Dint* v) { }
+ virtual void uniform2f(WebKit::WGC3Dint location, WebKit::WGC3Dfloat x, WebKit::WGC3Dfloat y) { }
+ virtual void uniform2fv(WebKit::WGC3Dint location, WebKit::WGC3Dsizei count, const WebKit::WGC3Dfloat* v) { }
+ virtual void uniform2i(WebKit::WGC3Dint location, WebKit::WGC3Dint x, WebKit::WGC3Dint y) { }
+ virtual void uniform2iv(WebKit::WGC3Dint location, WebKit::WGC3Dsizei count, const WebKit::WGC3Dint* v) { }
+ virtual void uniform3f(WebKit::WGC3Dint location, WebKit::WGC3Dfloat x, WebKit::WGC3Dfloat y, WebKit::WGC3Dfloat z) { }
+ virtual void uniform3fv(WebKit::WGC3Dint location, WebKit::WGC3Dsizei count, const WebKit::WGC3Dfloat* v) { }
+ virtual void uniform3i(WebKit::WGC3Dint location, WebKit::WGC3Dint x, WebKit::WGC3Dint y, WebKit::WGC3Dint z) { }
+ virtual void uniform3iv(WebKit::WGC3Dint location, WebKit::WGC3Dsizei count, const WebKit::WGC3Dint* v) { }
+ virtual void uniform4f(WebKit::WGC3Dint location, WebKit::WGC3Dfloat x, WebKit::WGC3Dfloat y, WebKit::WGC3Dfloat z, WebKit::WGC3Dfloat w) { }
+ virtual void uniform4fv(WebKit::WGC3Dint location, WebKit::WGC3Dsizei count, const WebKit::WGC3Dfloat* v) { }
+ virtual void uniform4i(WebKit::WGC3Dint location, WebKit::WGC3Dint x, WebKit::WGC3Dint y, WebKit::WGC3Dint z, WebKit::WGC3Dint w) { }
+ virtual void uniform4iv(WebKit::WGC3Dint location, WebKit::WGC3Dsizei count, const WebKit::WGC3Dint* v) { }
+ virtual void uniformMatrix2fv(WebKit::WGC3Dint location, WebKit::WGC3Dsizei count, WebKit::WGC3Dboolean transpose, const WebKit::WGC3Dfloat* value) { }
+ virtual void uniformMatrix3fv(WebKit::WGC3Dint location, WebKit::WGC3Dsizei count, WebKit::WGC3Dboolean transpose, const WebKit::WGC3Dfloat* value) { }
+ virtual void uniformMatrix4fv(WebKit::WGC3Dint location, WebKit::WGC3Dsizei count, WebKit::WGC3Dboolean transpose, const WebKit::WGC3Dfloat* value) { }
+
+ virtual void useProgram(WebKit::WebGLId program) { }
+ virtual void validateProgram(WebKit::WebGLId program) { }
+
+ virtual void vertexAttrib1f(WebKit::WGC3Duint index, WebKit::WGC3Dfloat x) { }
+ virtual void vertexAttrib1fv(WebKit::WGC3Duint index, const WebKit::WGC3Dfloat* values) { }
+ virtual void vertexAttrib2f(WebKit::WGC3Duint index, WebKit::WGC3Dfloat x, WebKit::WGC3Dfloat y) { }
+ virtual void vertexAttrib2fv(WebKit::WGC3Duint index, const WebKit::WGC3Dfloat* values) { }
+ virtual void vertexAttrib3f(WebKit::WGC3Duint index, WebKit::WGC3Dfloat x, WebKit::WGC3Dfloat y, WebKit::WGC3Dfloat z) { }
+ virtual void vertexAttrib3fv(WebKit::WGC3Duint index, const WebKit::WGC3Dfloat* values) { }
+ virtual void vertexAttrib4f(WebKit::WGC3Duint index, WebKit::WGC3Dfloat x, WebKit::WGC3Dfloat y, WebKit::WGC3Dfloat z, WebKit::WGC3Dfloat w) { }
+ virtual void vertexAttrib4fv(WebKit::WGC3Duint index, const WebKit::WGC3Dfloat* values) { }
+ virtual void vertexAttribPointer(WebKit::WGC3Duint index, WebKit::WGC3Dint size, WebKit::WGC3Denum type, WebKit::WGC3Dboolean normalized,
+ WebKit::WGC3Dsizei stride, WebKit::WGC3Dintptr offset) { }
+
+ virtual void viewport(WebKit::WGC3Dint x, WebKit::WGC3Dint y, WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height) { }
+
+ virtual WebKit::WebGLId createBuffer();
+ virtual WebKit::WebGLId createFramebuffer();
+ virtual WebKit::WebGLId createProgram();
+ virtual WebKit::WebGLId createRenderbuffer();
+ virtual WebKit::WebGLId createShader(WebKit::WGC3Denum);
+ virtual WebKit::WebGLId createTexture();
+
+ virtual void deleteBuffer(WebKit::WebGLId) { }
+ virtual void deleteFramebuffer(WebKit::WebGLId) { }
+ virtual void deleteProgram(WebKit::WebGLId) { }
+ virtual void deleteRenderbuffer(WebKit::WebGLId) { }
+ virtual void deleteShader(WebKit::WebGLId) { }
+ virtual void deleteTexture(WebKit::WebGLId) { }
+
+ virtual void texStorage2DEXT(WebKit::WGC3Denum target, WebKit::WGC3Dint levels, WebKit::WGC3Duint internalformat,
+ WebKit::WGC3Dint width, WebKit::WGC3Dint height) { }
+
+ virtual WebKit::WebGLId createQueryEXT();
+ virtual void deleteQueryEXT(WebKit::WebGLId) { }
+ virtual WebKit::WGC3Dboolean isQueryEXT(WebKit::WebGLId);
+ virtual void beginQueryEXT(WebKit::WGC3Denum, WebKit::WebGLId) { }
+ virtual void endQueryEXT(WebKit::WGC3Denum) { }
+ virtual void getQueryivEXT(WebKit::WGC3Denum, WebKit::WGC3Denum, WebKit::WGC3Dint*) { }
+ virtual void getQueryObjectuivEXT(WebKit::WebGLId, WebKit::WGC3Denum, WebKit::WGC3Duint*) { }
protected:
unsigned m_nextTextureId;
Attributes m_attrs;
};
-} // namespace WebKit
+} // namespace cc
#endif // CC_TEST_FAKE_WEB_GRAPHICS_CONTEXT_3D_H_
diff --git a/cc/test/fake_web_graphics_context_3d_unittest.cc b/cc/test/fake_web_graphics_context_3d_unittest.cc
index ade749f..e099408 100644
--- a/cc/test/fake_web_graphics_context_3d_unittest.cc
+++ b/cc/test/fake_web_graphics_context_3d_unittest.cc
@@ -8,7 +8,10 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-class ContextThatCountsMakeCurrents : public WebKit::FakeWebGraphicsContext3D {
+namespace cc {
+namespace {
+
+class ContextThatCountsMakeCurrents : public FakeWebGraphicsContext3D {
public:
ContextThatCountsMakeCurrents() : m_makeCurrentCount(0) { }
virtual bool makeContextCurrent() OVERRIDE
@@ -29,3 +32,6 @@ TEST(FakeWebGraphicsContext3DTest, CreationShouldNotMakeCurrent)
EXPECT_TRUE(context.get());
EXPECT_EQ(0, context->makeCurrentCount());
}
+
+} // namespace
+} // namespace cc
diff --git a/cc/test/fake_web_scrollbar_theme_geometry.cc b/cc/test/fake_web_scrollbar_theme_geometry.cc
new file mode 100644
index 0000000..7ae7f7a
--- /dev/null
+++ b/cc/test/fake_web_scrollbar_theme_geometry.cc
@@ -0,0 +1,91 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/test/fake_web_scrollbar_theme_geometry.h"
+
+namespace cc {
+
+WebKit::WebScrollbarThemeGeometry*
+ FakeWebScrollbarThemeGeometry::clone() const {
+ return new FakeWebScrollbarThemeGeometry();
+}
+
+int FakeWebScrollbarThemeGeometry::thumbPosition(WebKit::WebScrollbar*) {
+ return 0;
+}
+
+int FakeWebScrollbarThemeGeometry::thumbLength(WebKit::WebScrollbar*) {
+ return 0;
+}
+
+int FakeWebScrollbarThemeGeometry::trackPosition(WebKit::WebScrollbar*) {
+ return 0;
+}
+
+int FakeWebScrollbarThemeGeometry::trackLength(WebKit::WebScrollbar*) {
+ return 0;
+}
+
+bool FakeWebScrollbarThemeGeometry::hasButtons(WebKit::WebScrollbar*) {
+ return false;
+}
+
+bool FakeWebScrollbarThemeGeometry::hasThumb(WebKit::WebScrollbar*) {
+ return false;
+}
+
+WebKit::WebRect FakeWebScrollbarThemeGeometry::trackRect(WebKit::WebScrollbar*) {
+ return WebKit::WebRect();
+}
+
+WebKit::WebRect FakeWebScrollbarThemeGeometry::thumbRect(WebKit::WebScrollbar*) {
+ return WebKit::WebRect();
+}
+
+int FakeWebScrollbarThemeGeometry::minimumThumbLength(WebKit::WebScrollbar*) {
+ return 0;
+}
+
+int FakeWebScrollbarThemeGeometry::scrollbarThickness(WebKit::WebScrollbar*) {
+ return 0;
+}
+
+WebKit::WebRect FakeWebScrollbarThemeGeometry::backButtonStartRect(
+ WebKit::WebScrollbar*) {
+ return WebKit::WebRect();
+}
+
+WebKit::WebRect FakeWebScrollbarThemeGeometry::backButtonEndRect(
+ WebKit::WebScrollbar*) {
+ return WebKit::WebRect();
+}
+
+WebKit::WebRect FakeWebScrollbarThemeGeometry::forwardButtonStartRect(
+ WebKit::WebScrollbar*) {
+ return WebKit::WebRect();
+}
+
+WebKit::WebRect FakeWebScrollbarThemeGeometry::forwardButtonEndRect(
+ WebKit::WebScrollbar*) {
+ return WebKit::WebRect();
+}
+
+WebKit::WebRect FakeWebScrollbarThemeGeometry::constrainTrackRectToTrackPieces(
+ WebKit::WebScrollbar*,
+ const WebKit::WebRect&) {
+ return WebKit::WebRect();
+}
+
+void FakeWebScrollbarThemeGeometry::splitTrack(
+ WebKit::WebScrollbar*,
+ const WebKit::WebRect& track,
+ WebKit::WebRect& startTrack,
+ WebKit::WebRect& thumb,
+ WebKit::WebRect& endTrack) {
+ startTrack = WebKit::WebRect();
+ thumb = WebKit::WebRect();
+ endTrack = WebKit::WebRect();
+}
+
+} // namespace cc
diff --git a/cc/test/fake_web_scrollbar_theme_geometry.h b/cc/test/fake_web_scrollbar_theme_geometry.h
index cbff58e..2138bff 100644
--- a/cc/test/fake_web_scrollbar_theme_geometry.h
+++ b/cc/test/fake_web_scrollbar_theme_geometry.h
@@ -5,43 +5,35 @@
#ifndef CC_TEST_FAKE_WEB_SCROLLBAR_THEME_GEOMETRY_H_
#define CC_TEST_FAKE_WEB_SCROLLBAR_THEME_GEOMETRY_H_
+#include "base/memory/scoped_ptr.h"
#include <public/WebScrollbarThemeGeometry.h>
-namespace WebKit {
+namespace cc {
class FakeWebScrollbarThemeGeometry : public WebKit::WebScrollbarThemeGeometry {
public:
- static scoped_ptr<WebKit::WebScrollbarThemeGeometry> create() { return scoped_ptr<WebKit::WebScrollbarThemeGeometry>(new WebKit::FakeWebScrollbarThemeGeometry()); }
-
- virtual WebKit::WebScrollbarThemeGeometry* clone() const OVERRIDE
- {
- return new FakeWebScrollbarThemeGeometry();
- }
-
- virtual int thumbPosition(WebScrollbar*) OVERRIDE { return 0; }
- virtual int thumbLength(WebScrollbar*) OVERRIDE { return 0; }
- virtual int trackPosition(WebScrollbar*) OVERRIDE { return 0; }
- virtual int trackLength(WebScrollbar*) OVERRIDE { return 0; }
- virtual bool hasButtons(WebScrollbar*) OVERRIDE { return false; }
- virtual bool hasThumb(WebScrollbar*) OVERRIDE { return false; }
- virtual WebRect trackRect(WebScrollbar*) OVERRIDE { return WebRect(); }
- virtual WebRect thumbRect(WebScrollbar*) OVERRIDE { return WebRect(); }
- virtual int minimumThumbLength(WebScrollbar*) OVERRIDE { return 0; }
- virtual int scrollbarThickness(WebScrollbar*) OVERRIDE { return 0; }
- virtual WebRect backButtonStartRect(WebScrollbar*) OVERRIDE { return WebRect(); }
- virtual WebRect backButtonEndRect(WebScrollbar*) OVERRIDE { return WebRect(); }
- virtual WebRect forwardButtonStartRect(WebScrollbar*) OVERRIDE { return WebRect(); }
- virtual WebRect forwardButtonEndRect(WebScrollbar*) OVERRIDE { return WebRect(); }
- virtual WebRect constrainTrackRectToTrackPieces(WebScrollbar*, const WebRect&) OVERRIDE { return WebRect(); }
-
- virtual void splitTrack(WebScrollbar*, const WebRect& track, WebRect& startTrack, WebRect& thumb, WebRect& endTrack) OVERRIDE
- {
- startTrack = WebRect();
- thumb = WebRect();
- endTrack = WebRect();
- }
+ static scoped_ptr<WebKit::WebScrollbarThemeGeometry> create() { return scoped_ptr<WebKit::WebScrollbarThemeGeometry>(new FakeWebScrollbarThemeGeometry()); }
+
+ virtual WebKit::WebScrollbarThemeGeometry* clone() const OVERRIDE;
+
+ virtual int thumbPosition(WebKit::WebScrollbar*) OVERRIDE;
+ virtual int thumbLength(WebKit::WebScrollbar*) OVERRIDE;
+ virtual int trackPosition(WebKit::WebScrollbar*) OVERRIDE;
+ virtual int trackLength(WebKit::WebScrollbar*) OVERRIDE;
+ virtual bool hasButtons(WebKit::WebScrollbar*) OVERRIDE;
+ virtual bool hasThumb(WebKit::WebScrollbar*) OVERRIDE;
+ virtual WebKit::WebRect trackRect(WebKit::WebScrollbar*) OVERRIDE;
+ virtual WebKit::WebRect thumbRect(WebKit::WebScrollbar*) OVERRIDE;
+ virtual int minimumThumbLength(WebKit::WebScrollbar*) OVERRIDE;
+ virtual int scrollbarThickness(WebKit::WebScrollbar*) OVERRIDE;
+ virtual WebKit::WebRect backButtonStartRect(WebKit::WebScrollbar*) OVERRIDE;
+ virtual WebKit::WebRect backButtonEndRect(WebKit::WebScrollbar*) OVERRIDE;
+ virtual WebKit::WebRect forwardButtonStartRect(WebKit::WebScrollbar*) OVERRIDE;
+ virtual WebKit::WebRect forwardButtonEndRect(WebKit::WebScrollbar*) OVERRIDE;
+ virtual WebKit::WebRect constrainTrackRectToTrackPieces(WebKit::WebScrollbar*, const WebKit::WebRect&) OVERRIDE;
+ virtual void splitTrack(WebKit::WebScrollbar*, const WebKit::WebRect& track, WebKit::WebRect& startTrack, WebKit::WebRect& thumb, WebKit::WebRect& endTrack) OVERRIDE;
};
-} // namespace WebKit
+} // namespace cc
#endif // CC_TEST_FAKE_WEB_SCROLLBAR_THEME_GEOMETRY_H_
diff --git a/cc/test/geometry_test_utils.cc b/cc/test/geometry_test_utils.cc
index 0d5df94..35cd0dd 100644
--- a/cc/test/geometry_test_utils.cc
+++ b/cc/test/geometry_test_utils.cc
@@ -9,7 +9,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/transform.h"
-namespace WebKitTests {
+namespace cc {
// NOTE: even though transform data types use double precision, we only check
// for equality within single-precision error bounds because many transforms
@@ -57,4 +57,4 @@ void ExpectTransformationMatrixEq(const gfx::Transform& expected,
EXPECT_FLOAT_EQ((expected).matrix().getDouble(3, 3), (actual).matrix().getDouble(3, 3));
}
-} // namespace WebKitTests
+} // namespace cc
diff --git a/cc/test/geometry_test_utils.h b/cc/test/geometry_test_utils.h
index 92a37c3..30260c1 100644
--- a/cc/test/geometry_test_utils.h
+++ b/cc/test/geometry_test_utils.h
@@ -13,7 +13,7 @@ namespace WebKit {
class WebTransformationMatrix;
}
-namespace WebKitTests {
+namespace cc {
// These are macros instead of functions so that we get useful line numbers where a test failed.
#define EXPECT_FLOAT_RECT_EQ(expected, actual) \
@@ -70,9 +70,9 @@ void ExpectTransformationMatrixEq(const WebKit::WebTransformationMatrix& expecte
#define EXPECT_TRANSFORMATION_MATRIX_EQ(expected, actual) \
{ \
SCOPED_TRACE(""); \
- WebKitTests::ExpectTransformationMatrixEq(expected, actual); \
+ cc::ExpectTransformationMatrixEq(expected, actual); \
}
-} // namespace WebKitTests
+} // namespace cc
#endif // CC_TEST_GEOMETRY_TEST_UTILS_H_
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index 6b456f8..8d8d842 100644
--- a/cc/test/layer_test_common.cc
+++ b/cc/test/layer_test_common.cc
@@ -14,6 +14,7 @@
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/size_conversions.h"
+namespace cc {
namespace LayerTestCommon {
// Align with expected and actual output
@@ -55,3 +56,4 @@ void verifyQuadsExactlyCoverRect(const cc::QuadList& quads,
}
} // namespace LayerTestCommon
+} // namespace cc
diff --git a/cc/test/layer_test_common.h b/cc/test/layer_test_common.h
index 7b6309f..4b6ba83 100644
--- a/cc/test/layer_test_common.h
+++ b/cc/test/layer_test_common.h
@@ -13,6 +13,7 @@ namespace gfx {
class Rect;
}
+namespace cc {
namespace LayerTestCommon {
extern const char* quadString;
@@ -20,4 +21,6 @@ extern const char* quadString;
void verifyQuadsExactlyCoverRect(const cc::QuadList&, const gfx::Rect&);
} // namespace LayerTestCommon
+} // namespace cc
+
#endif // CC_TEST_LAYER_TEST_COMMON_H_
diff --git a/cc/test/layer_tree_test_common.cc b/cc/test/layer_tree_test_common.cc
index bfa15dd..88b4a8a 100644
--- a/cc/test/layer_tree_test_common.cc
+++ b/cc/test/layer_tree_test_common.cc
@@ -35,21 +35,21 @@ scoped_ptr<CompositorFakeWebGraphicsContext3DWithTextureTracking> CompositorFake
return make_scoped_ptr(new CompositorFakeWebGraphicsContext3DWithTextureTracking(attrs));
}
-WebGLId CompositorFakeWebGraphicsContext3DWithTextureTracking::createTexture()
+WebKit::WebGLId CompositorFakeWebGraphicsContext3DWithTextureTracking::createTexture()
{
- WebGLId texture = m_textures.size() + 1;
+ WebKit::WebGLId texture = m_textures.size() + 1;
m_textures.push_back(texture);
return texture;
}
-void CompositorFakeWebGraphicsContext3DWithTextureTracking::deleteTexture(WebGLId texture)
+void CompositorFakeWebGraphicsContext3DWithTextureTracking::deleteTexture(WebKit::WebGLId texture)
{
- std::vector<WebGLId>::iterator i(std::find(m_textures.begin(), m_textures.end(), texture));
+ std::vector<WebKit::WebGLId>::iterator i(std::find(m_textures.begin(), m_textures.end(), texture));
if (i != m_textures.end())
m_textures.erase(i);
}
-void CompositorFakeWebGraphicsContext3DWithTextureTracking::bindTexture(WGC3Denum /* target */, WebGLId texture)
+void CompositorFakeWebGraphicsContext3DWithTextureTracking::bindTexture(WebKit::WGC3Denum /* target */, WebKit::WebGLId texture)
{
m_usedTextures.insert(texture);
}
diff --git a/cc/test/layer_tree_test_common.h b/cc/test/layer_tree_test_common.h
index f126bb5..23c6d9b 100644
--- a/cc/test/layer_tree_test_common.h
+++ b/cc/test/layer_tree_test_common.h
@@ -21,19 +21,17 @@ class LayerTreeHost;
class LayerTreeHostClient;
class LayerTreeHostImpl;
class Thread;
-}
-namespace cc {
// Used by test stubs to notify the test when something interesting happens.
class TestHooks : public WebKit::WebAnimationDelegate {
public:
- virtual void beginCommitOnThread(cc::LayerTreeHostImpl*) { }
- virtual void commitCompleteOnThread(cc::LayerTreeHostImpl*) { }
- virtual bool prepareToDrawOnThread(cc::LayerTreeHostImpl*);
- virtual void drawLayersOnThread(cc::LayerTreeHostImpl*) { }
- virtual void animateLayers(cc::LayerTreeHostImpl*, base::TimeTicks monotonicTime) { }
- virtual void willAnimateLayers(cc::LayerTreeHostImpl*, base::TimeTicks monotonicTime) { }
+ virtual void beginCommitOnThread(LayerTreeHostImpl*) { }
+ virtual void commitCompleteOnThread(LayerTreeHostImpl*) { }
+ virtual bool prepareToDrawOnThread(LayerTreeHostImpl*);
+ virtual void drawLayersOnThread(LayerTreeHostImpl*) { }
+ virtual void animateLayers(LayerTreeHostImpl*, base::TimeTicks monotonicTime) { }
+ virtual void willAnimateLayers(LayerTreeHostImpl*, base::TimeTicks monotonicTime) { }
virtual void applyScrollAndScale(gfx::Vector2d, float) { }
virtual void animate(base::TimeTicks monotonicTime) { }
virtual void layout() { }
@@ -54,7 +52,7 @@ public:
class TimeoutTask;
class BeginTask;
-class MockLayerImplTreeHostClient : public cc::LayerTreeHostClient {
+class MockLayerImplTreeHostClient : public LayerTreeHostClient {
};
// The ThreadedTests runs with the main loop running. It instantiates a single MockLayerTreeHost and associated
@@ -78,7 +76,7 @@ public:
void endTestAfterDelay(int delayMilliseconds);
void postSetNeedsAnimateToMainThread();
- void postAddAnimationToMainThread(cc::Layer*);
+ void postAddAnimationToMainThread(Layer*);
void postAddInstantAnimationToMainThread();
void postSetNeedsCommitToMainThread();
void postAcquireLayerTextures();
@@ -89,12 +87,12 @@ public:
void doBeginTest();
void timeout();
- cc::LayerTreeHost* layerTreeHost() { return m_layerTreeHost.get(); }
+ LayerTreeHost* layerTreeHost() { return m_layerTreeHost.get(); }
protected:
ThreadedTest();
- virtual void initializeSettings(cc::LayerTreeSettings&) { }
+ virtual void initializeSettings(LayerTreeSettings&) { }
virtual void scheduleComposite() OVERRIDE;
@@ -102,7 +100,7 @@ protected:
void dispatchSetNeedsAnimate();
void dispatchAddInstantAnimation();
- void dispatchAddAnimation(cc::Layer*);
+ void dispatchAddAnimation(Layer*);
void dispatchSetNeedsCommit();
void dispatchAcquireLayerTextures();
void dispatchSetNeedsRedraw();
@@ -112,15 +110,15 @@ protected:
virtual void runTest(bool threaded);
- cc::Thread* implThread() { return proxy() ? proxy()->implThread() : 0; }
- cc::Proxy* proxy() const { return m_layerTreeHost ? m_layerTreeHost->proxy() : 0; }
+ Thread* implThread() { return proxy() ? proxy()->implThread() : 0; }
+ Proxy* proxy() const { return m_layerTreeHost ? m_layerTreeHost->proxy() : 0; }
- cc::LayerTreeSettings m_settings;
+ LayerTreeSettings m_settings;
scoped_ptr<MockLayerImplTreeHostClient> m_client;
- scoped_ptr<cc::LayerTreeHost> m_layerTreeHost;
+ scoped_ptr<LayerTreeHost> m_layerTreeHost;
protected:
- scoped_refptr<cc::ScopedThreadProxy> m_mainThreadProxy;
+ scoped_refptr<ScopedThreadProxy> m_mainThreadProxy;
private:
bool m_beginning;
@@ -130,7 +128,7 @@ private:
bool m_scheduled;
bool m_started;
- scoped_ptr<cc::Thread> m_mainCCThread;
+ scoped_ptr<Thread> m_mainCCThread;
scoped_ptr<base::Thread> m_implThread;
base::CancelableClosure m_timeout;
};
@@ -144,9 +142,9 @@ public:
};
// Adapts LayerTreeHostImpl for test. Runs real code, then invokes test hooks.
-class MockLayerTreeHostImpl : public cc::LayerTreeHostImpl {
+class MockLayerTreeHostImpl : public LayerTreeHostImpl {
public:
- static scoped_ptr<MockLayerTreeHostImpl> create(TestHooks*, const cc::LayerTreeSettings&, cc::LayerTreeHostImplClient*, cc::Proxy*);
+ static scoped_ptr<MockLayerTreeHostImpl> create(TestHooks*, const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy*);
virtual void beginCommit() OVERRIDE;
virtual void commitComplete() OVERRIDE;
@@ -154,7 +152,7 @@ public:
virtual void drawLayers(FrameData&) OVERRIDE;
// Make these public.
- typedef std::vector<cc::LayerImpl*> LayerList;
+ typedef std::vector<LayerImpl*> LayerList;
using LayerTreeHostImpl::calculateRenderSurfaceLayerList;
protected:
@@ -162,12 +160,12 @@ protected:
virtual base::TimeDelta lowFrequencyAnimationInterval() const OVERRIDE;
private:
- MockLayerTreeHostImpl(TestHooks*, const cc::LayerTreeSettings&, cc::LayerTreeHostImplClient*, cc::Proxy*);
+ MockLayerTreeHostImpl(TestHooks*, const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy*);
TestHooks* m_testHooks;
};
-class CompositorFakeWebGraphicsContext3DWithTextureTracking : public WebKit::CompositorFakeWebGraphicsContext3D {
+class CompositorFakeWebGraphicsContext3DWithTextureTracking : public CompositorFakeWebGraphicsContext3D {
public:
static scoped_ptr<CompositorFakeWebGraphicsContext3DWithTextureTracking> create(Attributes);
virtual ~CompositorFakeWebGraphicsContext3DWithTextureTracking();
@@ -193,7 +191,7 @@ private:
base::hash_set<WebKit::WebGLId> m_usedTextures;
};
-} // namespace WebKitTests
+} // namespace cc
#define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
TEST_F(TEST_FIXTURE_NAME, runSingleThread) \
diff --git a/cc/test/mock_quad_culler.cc b/cc/test/mock_quad_culler.cc
index 0be49cf..8f109dd 100644
--- a/cc/test/mock_quad_culler.cc
+++ b/cc/test/mock_quad_culler.cc
@@ -38,4 +38,4 @@ SharedQuadState* MockQuadCuller::useSharedQuadState(scoped_ptr<SharedQuadState>
return rawPtr;
}
-} // namespace cc
+} // namespace cc
diff --git a/cc/test/occlusion_tracker_test_common.h b/cc/test/occlusion_tracker_test_common.h
index 8186553..5a67ee5 100644
--- a/cc/test/occlusion_tracker_test_common.h
+++ b/cc/test/occlusion_tracker_test_common.h
@@ -9,7 +9,7 @@
#include "cc/render_surface.h"
#include "cc/render_surface_impl.h"
-namespace WebKitTests {
+namespace cc {
// A subclass to expose the total current occlusion.
template<typename LayerType, typename RenderSurfaceType>
@@ -30,6 +30,6 @@ public:
typedef TestOcclusionTrackerBase<cc::Layer, cc::RenderSurface> TestOcclusionTracker;
typedef TestOcclusionTrackerBase<cc::LayerImpl, cc::RenderSurfaceImpl> TestOcclusionTrackerImpl;
-}
+} // namespace cc
#endif // CC_TEST_OCCLUSION_TRACKER_TEST_COMMON_H_
diff --git a/cc/test/paths.cc b/cc/test/paths.cc
index 3551afb..a8f2e2f 100644
--- a/cc/test/paths.cc
+++ b/cc/test/paths.cc
@@ -9,7 +9,6 @@
#include "base/path_service.h"
namespace cc {
-namespace test {
bool PathProvider(int key, FilePath* result) {
FilePath cur;
@@ -40,5 +39,4 @@ void RegisterPathProvider() {
PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
}
-} // namespace test
} // namespace cc
diff --git a/cc/test/paths.h b/cc/test/paths.h
index bc3f4e0..07b7a64 100644
--- a/cc/test/paths.h
+++ b/cc/test/paths.h
@@ -6,7 +6,6 @@
#define CC_TEST_PATHS_H_
namespace cc {
-namespace test {
enum {
PATH_START = 5000,
@@ -20,7 +19,6 @@ enum {
// Call once to register the provider for the path keys defined above.
void RegisterPathProvider();
-} // namespace test
} // namespace cc
#endif // CC_TEST_PATHS_H_
diff --git a/cc/test/pixel_test_output_surface.h b/cc/test/pixel_test_output_surface.h
index ab9b161..b3f26c41 100644
--- a/cc/test/pixel_test_output_surface.h
+++ b/cc/test/pixel_test_output_surface.h
@@ -34,5 +34,4 @@ class PixelTestOutputSurface : public OutputSurface {
} // namespace cc
-
#endif // CC_TEST_PIXEL_TEST_GRAPHICS_CONTEXT_H_
diff --git a/cc/test/pixel_test_utils.cc b/cc/test/pixel_test_utils.cc
index ad455c0..dbb1191 100644
--- a/cc/test/pixel_test_utils.cc
+++ b/cc/test/pixel_test_utils.cc
@@ -10,7 +10,6 @@
#include "ui/gfx/codec/png_codec.h"
namespace cc {
-namespace test {
bool WritePNGFile(const SkBitmap& bitmap, const FilePath& file_path) {
std::vector<unsigned char> png_data;
@@ -76,6 +75,4 @@ bool IsSameAsPNGFile(const SkBitmap& gen_bmp, FilePath ref_img_path) {
return true;
}
-} // namespace test
} // namespace cc
-
diff --git a/cc/test/pixel_test_utils.h b/cc/test/pixel_test_utils.h
index 93367d8..3fa990d6 100644
--- a/cc/test/pixel_test_utils.h
+++ b/cc/test/pixel_test_utils.h
@@ -2,12 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#ifndef CC_TEST_PIXEL_TEST_UTILS_H_
+#define CC_TEST_PIXEL_TEST_UTILS_H_
+
#include "base/file_path.h"
class SkBitmap;
namespace cc {
-namespace test {
// Encodes a bitmap into a PNG and write to disk. Returns true on success. The
// parent directory does not have to exist.
@@ -21,5 +23,6 @@ bool ReadPNGFile(const FilePath& file_path, SkBitmap* bitmap);
// the given image. |ref_img_path| is absolute.
bool IsSameAsPNGFile(const SkBitmap& gen_bmp, FilePath ref_img_path);
-} // namespace test
} // namespace cc
+
+#endif // CC_TEST_PIXEL_TEST_UTILS_H_
diff --git a/cc/test/render_pass_test_common.cc b/cc/test/render_pass_test_common.cc
index e50912d..c00a1dc 100644
--- a/cc/test/render_pass_test_common.cc
+++ b/cc/test/render_pass_test_common.cc
@@ -17,9 +17,7 @@
#include "cc/resource_provider.h"
#include "ui/gfx/transform.h"
-namespace WebKitTests {
-
-using cc::DrawQuad;
+namespace cc {
void TestRenderPass::AppendOneOfEveryQuadType(cc::ResourceProvider* resourceProvider) {
gfx::Rect rect(0, 0, 100, 100);
@@ -170,4 +168,4 @@ void TestRenderPass::AppendOneOfEveryQuadType(cc::ResourceProvider* resourceProv
AppendSharedQuadState(shared_state.Pass());
}
-} // namespace WebKitTests
+} // namespace cc
diff --git a/cc/test/render_pass_test_common.h b/cc/test/render_pass_test_common.h
index 34d8522..c565df0 100644
--- a/cc/test/render_pass_test_common.h
+++ b/cc/test/render_pass_test_common.h
@@ -11,7 +11,7 @@ namespace cc {
class ResourceProvider;
}
-namespace WebKitTests {
+namespace cc {
class TestRenderPass : public cc::RenderPass {
public:
@@ -32,6 +32,6 @@ class TestRenderPass : public cc::RenderPass {
TestRenderPass() : RenderPass() {}
};
-} // namespace WebKitTests
+} // namespace cc
#endif // CC_TEST_RENDER_PASS_TEST_COMMON_H_
diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc
index 579bc1e..6e54ba4 100644
--- a/cc/test/render_pass_test_utils.cc
+++ b/cc/test/render_pass_test_utils.cc
@@ -13,8 +13,6 @@
#include "cc/test/render_pass_test_common.h"
#include "ui/gfx/rect.h"
-using WebKitTests::TestRenderPass;
-
namespace cc {
TestRenderPass* addRenderPass(ScopedPtrVector<RenderPass>& passList,
diff --git a/cc/test/render_pass_test_utils.h b/cc/test/render_pass_test_utils.h
index c06fbd6..140e029 100644
--- a/cc/test/render_pass_test_utils.h
+++ b/cc/test/render_pass_test_utils.h
@@ -14,30 +14,27 @@ class Rect;
class Transform;
}
-namespace WebKitTests {
-class TestRenderPass;
-}
-
namespace cc {
class SolidColorDrawQuad;
+class TestRenderPass;
// Adds a new render pass with the provided properties to the given
// render pass list.
-WebKitTests::TestRenderPass* addRenderPass(
+TestRenderPass* addRenderPass(
ScopedPtrVector<RenderPass>& passList,
RenderPass::Id id,
const gfx::Rect& outputRect,
const gfx::Transform& rootTransform);
// Adds a solid quad to a given render pass.
-SolidColorDrawQuad* addQuad(WebKitTests::TestRenderPass* pass,
+SolidColorDrawQuad* addQuad(TestRenderPass* pass,
const gfx::Rect& rect,
SkColor color);
// Adds a render pass quad to an existing render pass.
-void addRenderPassQuad(WebKitTests::TestRenderPass* toPass,
- WebKitTests::TestRenderPass* contributingPass);
+void addRenderPassQuad(TestRenderPass* toPass,
+ TestRenderPass* contributingPass);
} // namespace cc
diff --git a/cc/test/run_all_unittests.cc b/cc/test/run_all_unittests.cc
index 40c224e..b4ec092 100644
--- a/cc/test/run_all_unittests.cc
+++ b/cc/test/run_all_unittests.cc
@@ -9,7 +9,7 @@
int main(int argc, char** argv) {
::testing::InitGoogleMock(&argc, argv);
- cc::test::CCTestSuite test_suite(argc, argv);
+ cc::CCTestSuite test_suite(argc, argv);
int result = test_suite.Run();
return result;
diff --git a/cc/test/scheduler_test_common.cc b/cc/test/scheduler_test_common.cc
index 547124e..f295098 100644
--- a/cc/test/scheduler_test_common.cc
+++ b/cc/test/scheduler_test_common.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
-namespace WebKitTests {
+namespace cc {
void FakeTimeSourceClient::onTimerTick()
{
@@ -79,4 +79,4 @@ base::TimeTicks FakeDelayBasedTimeSource::now() const
return m_now;
}
-}
+} // namespace cc
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h
index af1bd32..be13fbf 100644
--- a/cc/test/scheduler_test_common.h
+++ b/cc/test/scheduler_test_common.h
@@ -11,7 +11,7 @@
#include "cc/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace WebKitTests {
+namespace cc {
class FakeTimeSourceClient : public cc::TimeSourceClient {
public:
@@ -120,6 +120,6 @@ public:
int numFramesPending() const { return m_numFramesPending; }
};
-}
+} // namespace cc
#endif // CC_TEST_SCHEDULER_TEST_COMMON_H_
diff --git a/cc/test/tiled_layer_test_common.cc b/cc/test/tiled_layer_test_common.cc
index f891d36..2caba80 100644
--- a/cc/test/tiled_layer_test_common.cc
+++ b/cc/test/tiled_layer_test_common.cc
@@ -170,4 +170,4 @@ void FakeTiledLayerWithScaledBounds::didUpdateBounds()
drawProperties().content_bounds = m_forcedContentBounds;
}
-} // namespace
+} // namespace cc
diff --git a/cc/test/tiled_layer_test_common.h b/cc/test/tiled_layer_test_common.h
index 169179a..78d661d 100644
--- a/cc/test/tiled_layer_test_common.h
+++ b/cc/test/tiled_layer_test_common.h
@@ -130,5 +130,6 @@ protected:
gfx::Size m_forcedContentBounds;
};
-}
+} // namespace cc
+
#endif // CC_TEST_TILED_LAYER_TEST_COMMON_H_