summaryrefslogtreecommitdiffstats
path: root/cc/test/pixel_test.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-15 04:57:34 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-15 04:57:34 +0000
commita7252f11b13e3e5193f7d40ae9e6464a3dbdb2ac (patch)
tree116654d64447a41283154671a99c42cb2adfcf37 /cc/test/pixel_test.h
parentfb52ada47741872b4add857717c9d79cf23b6704 (diff)
downloadchromium_src-a7252f11b13e3e5193f7d40ae9e6464a3dbdb2ac.zip
chromium_src-a7252f11b13e3e5193f7d40ae9e6464a3dbdb2ac.tar.gz
chromium_src-a7252f11b13e3e5193f7d40ae9e6464a3dbdb2ac.tar.bz2
cc: Add layer-based pixel tests.
This adds a test framework for pixel tests based on a layer tree. Included is a single new pixel test to demonstrate the framework, which is a test derived from the layout test platform/chromium/compositing/filters/background-filter-blur.html reproduced with solid color layers. New test: LayerTreeHostFiltersPixelTest.BackgroundFilterBlur R=jamesr BUG=191170 Review URL: https://chromiumcodereview.appspot.com/12518026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/pixel_test.h')
-rw-r--r--cc/test/pixel_test.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/cc/test/pixel_test.h b/cc/test/pixel_test.h
new file mode 100644
index 0000000..40acb33
--- /dev/null
+++ b/cc/test/pixel_test.h
@@ -0,0 +1,36 @@
+// Copyright 2013 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 "base/file_util.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/size.h"
+
+#ifndef CC_TEST_PIXEL_TEST_H_
+#define CC_TEST_PIXEL_TEST_H_
+
+namespace cc {
+class GLRenderer;
+class OutputSurface;
+class ResourceProvider;
+
+class PixelTest : public testing::Test {
+ protected:
+ PixelTest();
+ virtual ~PixelTest();
+
+ virtual void SetUp() OVERRIDE;
+
+ bool PixelsMatchReference(const base::FilePath& ref_file);
+
+ gfx::Size device_viewport_size_;
+ scoped_ptr<OutputSurface> output_surface_;
+ scoped_ptr<ResourceProvider> resource_provider_;
+ class PixelTestRendererClient;
+ scoped_ptr<PixelTestRendererClient> fake_client_;
+ scoped_ptr<GLRenderer> renderer_;
+};
+
+} // namespace cc
+
+#endif // CC_TEST_PIXEL_TEST_H_