Commit fcb98b71 authored by vollick@chromium.org's avatar vollick@chromium.org

Adds a couple of pixel-based compositor unittests. One to test that opacity is...

Adds a couple of pixel-based compositor unittests. One to test that opacity is handled correctly, and one to check that MoveToFront and MoveAbove really do change the compositor output as expected.

Noteworthy changes are in layer_unittest.cc. Most of the changes below are due to moving compositor testing code into ui/gfx/compositor/test.

Depends on http://codereview.chromium.org/8463024/ and http://codereview.chromium.org/8590019/

BUG=None
TEST=compositor_unittests

Review URL: http://codereview.chromium.org/8533019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110657 0039d316-1c4b-4281-b951-d872f2087c98
parent c85a9a17
......@@ -16,7 +16,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/gfx/canvas_skia.h"
#include "ui/gfx/compositor/compositor_test_support.h"
#include "ui/gfx/compositor/test/compositor_test_support.h"
#include "ui/gfx/rect.h"
#if defined(USE_X11)
......@@ -118,4 +118,3 @@ int main(int argc, char** argv) {
return 0;
}
......@@ -9,7 +9,7 @@
#include "build/build_config.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/gfx/compositor/compositor_test_support.h"
#include "ui/gfx/compositor/test/compositor_test_support.h"
#include "ui/gfx/gfx_paths.h"
#include "ui/gfx/gl/gl_implementation.h"
#include "ui/gfx/test/gfx_test_utils.h"
......
......@@ -15,7 +15,7 @@
#include "ui/aura_shell/shell_factory.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/gfx/compositor/compositor_test_support.h"
#include "ui/gfx/compositor/test/compositor_test_support.h"
namespace {
......
......@@ -9,7 +9,7 @@
#include "build/build_config.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/gfx/compositor/compositor_test_support.h"
#include "ui/gfx/compositor/test/compositor_test_support.h"
#include "ui/gfx/gfx_paths.h"
#include "ui/gfx/test/gfx_test_utils.h"
......
......@@ -116,8 +116,8 @@
'<(DEPTH)/base/base.gyp:base',
],
'sources': [
'compositor_test_support.cc',
'compositor_test_support.h',
'test/compositor_test_support.cc',
'test/compositor_test_support.h',
],
'conditions': [
['use_webkit_compositor == 1', {
......@@ -160,17 +160,17 @@
'layer_animator_unittest.cc',
'layer_unittest.cc',
'run_all_unittests.cc',
'test_compositor_host.h',
'test_compositor_host_linux.cc',
'test_compositor_host_win.cc',
'test_layer_animation_delegate.cc',
'test_layer_animation_delegate.h',
'test_layer_animation_observer.cc',
'test_layer_animation_observer.h',
'test_suite.cc',
'test_suite.h',
'test_utils.cc',
'test_utils.h',
'test/test_compositor_host.h',
'test/test_compositor_host_linux.cc',
'test/test_compositor_host_win.cc',
'test/test_layer_animation_delegate.cc',
'test/test_layer_animation_delegate.h',
'test/test_layer_animation_observer.cc',
'test/test_layer_animation_observer.h',
'test/test_suite.cc',
'test/test_suite.h',
'test/test_utils.cc',
'test/test_utils.h',
'<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.rc',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.rc',
],
......@@ -202,10 +202,10 @@
'compositor',
],
'sources': [
'test_compositor.cc',
'test_compositor.h',
'test_texture.cc',
'test_texture.h',
'test/test_compositor.cc',
'test/test_compositor.h',
'test/test_texture.cc',
'test/test_texture.h',
],
}],
],
......
......@@ -12,8 +12,8 @@
#include "ui/gfx/rect.h"
#include "ui/gfx/transform.h"
#include "ui/gfx/compositor/layer_animation_delegate.h"
#include "ui/gfx/compositor/test_layer_animation_delegate.h"
#include "ui/gfx/compositor/test_utils.h"
#include "ui/gfx/compositor/test/test_layer_animation_delegate.h"
#include "ui/gfx/compositor/test/test_utils.h"
namespace ui {
......
......@@ -13,9 +13,9 @@
#include "ui/gfx/transform.h"
#include "ui/gfx/compositor/layer_animation_delegate.h"
#include "ui/gfx/compositor/layer_animation_element.h"
#include "ui/gfx/compositor/test_layer_animation_delegate.h"
#include "ui/gfx/compositor/test_layer_animation_observer.h"
#include "ui/gfx/compositor/test_utils.h"
#include "ui/gfx/compositor/test/test_layer_animation_delegate.h"
#include "ui/gfx/compositor/test/test_layer_animation_observer.h"
#include "ui/gfx/compositor/test/test_utils.h"
namespace ui {
......
......@@ -14,9 +14,9 @@
#include "ui/gfx/compositor/layer_animation_delegate.h"
#include "ui/gfx/compositor/layer_animation_element.h"
#include "ui/gfx/compositor/layer_animation_sequence.h"
#include "ui/gfx/compositor/test_layer_animation_delegate.h"
#include "ui/gfx/compositor/test_layer_animation_observer.h"
#include "ui/gfx/compositor/test_utils.h"
#include "ui/gfx/compositor/test/test_layer_animation_delegate.h"
#include "ui/gfx/compositor/test/test_layer_animation_observer.h"
#include "ui/gfx/compositor/test/test_utils.h"
namespace ui {
......
......@@ -15,13 +15,82 @@
#include "ui/gfx/compositor/compositor_observer.h"
#include "ui/gfx/compositor/layer.h"
#include "ui/gfx/compositor/layer_animation_sequence.h"
#include "ui/gfx/compositor/test_compositor.h"
#include "ui/gfx/compositor/test_compositor_host.h"
#include "ui/gfx/compositor/test/test_compositor.h"
#include "ui/gfx/compositor/test/test_compositor_host.h"
#include "ui/gfx/gfx_paths.h"
namespace ui {
namespace {
// Encodes a bitmap into a PNG and write to disk. Returns true on success. The
// parent directory does not have to exist.
bool WritePNGFile(const SkBitmap& bitmap, const FilePath& file_path) {
std::vector<unsigned char> png_data;
if (gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, true, &png_data) &&
file_util::CreateDirectory(file_path.DirName())) {
char* data = reinterpret_cast<char*>(&png_data[0]);
int size = static_cast<int>(png_data.size());
return file_util::WriteFile(file_path, data, size) == size;
}
return false;
}
// Reads and decodes a PNG image to a bitmap. Returns true on success. The PNG
// should have been encoded using |gfx::PNGCodec::Encode|.
bool ReadPNGFile(const FilePath& file_path, SkBitmap* bitmap) {
DCHECK(bitmap);
std::string png_data;
return file_util::ReadFileToString(file_path, &png_data) &&
gfx::PNGCodec::Decode(reinterpret_cast<unsigned char*>(&png_data[0]),
png_data.length(),
bitmap);
}
// Compares with a PNG file on disk, and returns true if it is the same as
// the given image. |ref_img_path| is absolute.
bool IsSameAsPNGFile(const SkBitmap& gen_bmp, FilePath ref_img_path) {
SkBitmap ref_bmp;
if (!ReadPNGFile(ref_img_path, &ref_bmp)) {
LOG(ERROR) << "Cannot read reference image: " << ref_img_path.value();
return false;
}
if (ref_bmp.width() != gen_bmp.width() ||
ref_bmp.height() != gen_bmp.height()) {
LOG(ERROR)
<< "Dimensions do not match (Expected) vs (Actual):"
<< "(" << ref_bmp.width() << "x" << ref_bmp.height()
<< ") vs. "
<< "(" << gen_bmp.width() << "x" << gen_bmp.height() << ")";
return false;
}
// Compare pixels and create a simple diff image.
int diff_pixels_count = 0;
SkAutoLockPixels lock_bmp(gen_bmp);
SkAutoLockPixels lock_ref_bmp(ref_bmp);
// The reference images were saved with no alpha channel. Use the mask to
// set alpha to 0.
uint32_t kAlphaMask = 0x00FFFFFF;
for (int x = 0; x < gen_bmp.width(); ++x) {
for (int y = 0; y < gen_bmp.height(); ++y) {
if ((*gen_bmp.getAddr32(x, y) & kAlphaMask) !=
(*ref_bmp.getAddr32(x, y) & kAlphaMask)) {
++diff_pixels_count;
}
}
}
if (diff_pixels_count != 0) {
LOG(ERROR) << "Images differ by pixel count: " << diff_pixels_count;
return false;
}
return true;
}
// There are three test classes in here that configure the Compositor and
// Layer's slightly differently:
// - LayerWithNullDelegateTest uses TestCompositor and NullLayerDelegate as the
......@@ -53,7 +122,13 @@ class ColoredLayer : public Layer, public LayerDelegate {
class LayerWithRealCompositorTest : public testing::Test {
public:
LayerWithRealCompositorTest() {}
LayerWithRealCompositorTest() {
if (PathService::Get(gfx::DIR_TEST_DATA, &test_data_directory_)) {
test_data_directory_ = test_data_directory_.AppendASCII("compositor");
} else {
LOG(ERROR) << "Could not open test data directory.";
}
}
virtual ~LayerWithRealCompositorTest() {}
// Overridden from testing::Test:
......@@ -105,9 +180,14 @@ class LayerWithRealCompositorTest : public testing::Test {
gfx::Rect(0, 0, layer->bounds().width(), layer->bounds().height()));
}
const FilePath& test_data_directory() const { return test_data_directory_; }
private:
scoped_ptr<TestCompositorHost> window_;
// The root directory for test files.
FilePath test_data_directory_;
DISALLOW_COPY_AND_ASSIGN(LayerWithRealCompositorTest);
};
......@@ -178,20 +258,6 @@ class NullLayerDelegate : public LayerDelegate {
DISALLOW_COPY_AND_ASSIGN(NullLayerDelegate);
};
// Encodes a bitmap into a PNG and write to disk. Returns true on success. The
// parent directory does not have to exist.
bool WritePNGFile(const SkBitmap& bitmap, const FilePath& file_path) {
std::vector<unsigned char> png_data;
if (gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, true, &png_data) &&
file_util::CreateDirectory(file_path.DirName())) {
int bytes_written = file_util::WriteFile(
file_path, reinterpret_cast<char*>(&png_data[0]), png_data.size());
if (bytes_written == static_cast<int>(png_data.size()))
return true;
}
return false;
}
// Remembers if it has been notified.
class TestCompositorObserver : public CompositorObserver {
public:
......@@ -224,6 +290,8 @@ class TestCompositorObserver : public CompositorObserver {
#define MAYBE_DrawPixels DISABLED_DrawPixels
#define MAYBE_SetRootLayer DISABLED_SetRootLayer
#define MAYBE_CompositorObservers DISABLED_CompositorObservers
#define MAYBE_ModifyHierarchy DISABLED_ModifyHierarchy
#define MAYBE_Opacity DISABLED_Opacity
#else
#define MAYBE_Delegate Delegate
#define MAYBE_Draw Draw
......@@ -233,6 +301,8 @@ class TestCompositorObserver : public CompositorObserver {
#define MAYBE_DrawPixels DrawPixels
#define MAYBE_SetRootLayer SetRootLayer
#define MAYBE_CompositorObservers CompositorObservers
#define MAYBE_ModifyHierarchy ModifyHierarchy
#define MAYBE_Opacity Opacity
#endif
TEST_F(LayerWithRealCompositorTest, MAYBE_Draw) {
......@@ -1128,4 +1198,87 @@ TEST_F(LayerWithRealCompositorTest, MAYBE_CompositorObservers) {
EXPECT_FALSE(observer.notified());
}
// Checks that modifying the hierarchy correctly affects final composite.
TEST_F(LayerWithRealCompositorTest, MAYBE_ModifyHierarchy) {
GetCompositor()->WidgetSizeChanged(gfx::Size(50, 50));
// l0
// +-l11
// | +-l21
// +-l12
scoped_ptr<Layer> l0(CreateColorLayer(SK_ColorRED,
gfx::Rect(0, 0, 50, 50)));
scoped_ptr<Layer> l11(CreateColorLayer(SK_ColorGREEN,
gfx::Rect(0, 0, 25, 25)));
scoped_ptr<Layer> l21(CreateColorLayer(SK_ColorMAGENTA,
gfx::Rect(0, 0, 15, 15)));
scoped_ptr<Layer> l12(CreateColorLayer(SK_ColorBLUE,
gfx::Rect(10, 10, 25, 25)));
FilePath ref_img1 = test_data_directory().AppendASCII("ModifyHierarchy1.png");
FilePath ref_img2 = test_data_directory().AppendASCII("ModifyHierarchy2.png");
SkBitmap bitmap;
l0->Add(l11.get());
l11->Add(l21.get());
l0->Add(l12.get());
DrawTree(l0.get());
ASSERT_TRUE(GetCompositor()->ReadPixels(&bitmap));
ASSERT_FALSE(bitmap.empty());
// WritePNGFile(bitmap, ref_img1);
EXPECT_TRUE(IsSameAsPNGFile(bitmap, ref_img1));
l0->MoveToFront(l11.get());
DrawTree(l0.get());
ASSERT_TRUE(GetCompositor()->ReadPixels(&bitmap));
ASSERT_FALSE(bitmap.empty());
// WritePNGFile(bitmap, ref_img2);
EXPECT_TRUE(IsSameAsPNGFile(bitmap, ref_img2));
// l11 is already at the front, should have no effect.
l0->MoveToFront(l11.get());
DrawTree(l0.get());
ASSERT_TRUE(GetCompositor()->ReadPixels(&bitmap));
ASSERT_FALSE(bitmap.empty());
EXPECT_TRUE(IsSameAsPNGFile(bitmap, ref_img2));
// l11 is already at the front, should have no effect.
l0->MoveAbove(l11.get(), l12.get());
DrawTree(l0.get());
ASSERT_TRUE(GetCompositor()->ReadPixels(&bitmap));
ASSERT_FALSE(bitmap.empty());
EXPECT_TRUE(IsSameAsPNGFile(bitmap, ref_img2));
// should restore to original configuration
l0->MoveAbove(l12.get(), l11.get());
DrawTree(l0.get());
ASSERT_TRUE(GetCompositor()->ReadPixels(&bitmap));
ASSERT_FALSE(bitmap.empty());
EXPECT_TRUE(IsSameAsPNGFile(bitmap, ref_img1));
}
// Opacity is rendered correctly.
// Checks that modifying the hierarchy correctly affects final composite.
TEST_F(LayerWithRealCompositorTest, MAYBE_Opacity) {
GetCompositor()->WidgetSizeChanged(gfx::Size(50, 50));
// l0
// +-l11
scoped_ptr<Layer> l0(CreateColorLayer(SK_ColorRED,
gfx::Rect(0, 0, 50, 50)));
scoped_ptr<Layer> l11(CreateColorLayer(SK_ColorGREEN,
gfx::Rect(0, 0, 25, 25)));
FilePath ref_img = test_data_directory().AppendASCII("Opacity.png");
l11->SetOpacity(0.75);
l0->Add(l11.get());
DrawTree(l0.get());
SkBitmap bitmap;
ASSERT_TRUE(GetCompositor()->ReadPixels(&bitmap));
ASSERT_FALSE(bitmap.empty());
// WritePNGFile(bitmap, ref_img);
EXPECT_TRUE(IsSameAsPNGFile(bitmap, ref_img));
}
} // namespace ui
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/compositor/test_suite.h"
#include "ui/gfx/compositor/test/test_suite.h"
int main(int argc, char** argv) {
return CompositorTestSuite(argc, argv).Run();
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/compositor/compositor_test_support.h"
#include "ui/gfx/compositor/test/compositor_test_support.h"
#if defined(USE_WEBKIT_COMPOSITOR)
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_GFX_COMPOSITOR_TEST_SUPPORT_H_
#define UI_GFX_COMPOSITOR_TEST_SUPPORT_H_
#ifndef UI_GFX_COMPOSITOR_TEST_TEST_SUPPORT_H_
#define UI_GFX_COMPOSITOR_TEST_TEST_SUPPORT_H_
#pragma once
namespace ui {
......@@ -18,4 +18,4 @@ class CompositorTestSupport {
} // namespace ui
#endif // UI_GFX_COMPOSITOR_TEST_SUPPORT_H_
#endif // UI_GFX_COMPOSITOR_TEST_TEST_SUPPORT_H_
......@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/compositor/test_compositor.h"
#include "ui/gfx/compositor/test/test_compositor.h"
#include "ui/gfx/compositor/test_texture.h"
#include "ui/gfx/compositor/test/test_texture.h"
namespace ui {
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_GFX_COMPOSITOR_TEST_COMPOSITOR_H_
#define UI_GFX_COMPOSITOR_TEST_COMPOSITOR_H_
#ifndef UI_GFX_COMPOSITOR_TEST_TEST_COMPOSITOR_H_
#define UI_GFX_COMPOSITOR_TEST_TEST_COMPOSITOR_H_
#pragma once
#include "base/basictypes.h"
......@@ -43,4 +43,4 @@ class TestCompositor : public ui::Compositor {
} // namespace ui
#endif // UI_GFX_COMPOSITOR_TEST_COMPOSITOR_H_
#endif // UI_GFX_COMPOSITOR_TEST_TEST_COMPOSITOR_H_
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_GFX_COMPOSITOR_TEST_COMPOSITOR_HOST_H_
#define UI_GFX_COMPOSITOR_TEST_COMPOSITOR_HOST_H_
#ifndef UI_GFX_COMPOSITOR_TEST_TEST_COMPOSITOR_HOST_H_
#define UI_GFX_COMPOSITOR_TEST_TEST_COMPOSITOR_HOST_H_
#pragma once
#include "base/message_loop.h"
......@@ -31,4 +31,4 @@ class TestCompositorHost : public MessageLoop::Dispatcher {
} // namespace ui
#endif // UI_GFX_COMPOSITOR_TEST_COMPOSITOR_HOST_H_
#endif // UI_GFX_COMPOSITOR_TEST_TEST_COMPOSITOR_HOST_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/compositor/test_compositor_host.h"
#include "ui/gfx/compositor/test/test_compositor_host.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/compositor/test_compositor_host.h"
#include "ui/gfx/compositor/test/test_compositor_host.h"
#include "base/compiler_specific.h"
#include "ui/base/win/window_impl.h"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/compositor/test_layer_animation_delegate.h"
#include "ui/gfx/compositor/test/test_layer_animation_delegate.h"
namespace ui {
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_DELEGATE_H_
#define UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_DELEGATE_H_
#ifndef UI_GFX_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_
#define UI_GFX_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_
#pragma once
#include "base/compiler_specific.h"
......@@ -38,4 +38,4 @@ class TestLayerAnimationDelegate : public LayerAnimationDelegate {
} // namespace ui
#endif // UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_DELEGATE_H_
#endif // UI_GFX_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/compositor/test_layer_animation_observer.h"
#include "ui/gfx/compositor/test/test_layer_animation_observer.h"
#include <cstddef>
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_OBSERVER_
#define UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_OBSERVER_
#ifndef UI_GFX_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_OBSERVER_
#define UI_GFX_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_OBSERVER_
#pragma once
#include "base/compiler_specific.h"
......@@ -52,4 +52,4 @@ class TestLayerAnimationObserver : public LayerAnimationObserver {
} // namespace ui
#endif // UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_OBSERVER_
#endif // UI_GFX_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_OBSERVER_
......@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/compositor/test_suite.h"
#include "ui/gfx/compositor/test/test_suite.h"
#include "base/message_loop.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/gfx/compositor/compositor_test_support.h"
#include "ui/gfx/compositor/test/compositor_test_support.h"
#include "ui/gfx/gfx_paths.h"
#include "ui/gfx/gl/gl_implementation.h"
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_GFX_COMPOSITOR_TEST_SUITE_H_
#define UI_GFX_COMPOSITOR_TEST_SUITE_H_
#ifndef UI_GFX_COMPOSITOR_TEST_TEST_SUITE_H_
#define UI_GFX_COMPOSITOR_TEST_TEST_SUITE_H_
#pragma once
#include "base/compiler_specific.h"
......@@ -26,4 +26,4 @@ class CompositorTestSuite : public base::TestSuite {
scoped_ptr<MessageLoop> message_loop_;
};
#endif // UI_GFX_COMPOSITOR_TEST_SUITE_H_
#endif // UI_GFX_COMPOSITOR_TEST_TEST_SUITE_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/compositor/test_texture.h"
#include "ui/gfx/compositor/test/test_texture.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkDevice.h"
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_GFX_COMPOSITOR_TEST_TEXTURE_H_
#define UI_GFX_COMPOSITOR_TEST_TEXTURE_H_
#ifndef UI_GFX_COMPOSITOR_TEST_TEST_TEXTURE_H_
#define UI_GFX_COMPOSITOR_TEST_TEST_TEXTURE_H_
#pragma once
#include "base/basictypes.h"
......@@ -47,4 +47,4 @@ class TestTexture : public ui::Texture {
} // namespace ui
#endif // UI_GFX_COMPOSITOR_TEST_TEXTURE_H_
#endif // UI_GFX_COMPOSITOR_TEST_TEST_TEXTURE_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/compositor/test_utils.h"
#include "ui/gfx/compositor/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/rect.h"
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_GFX_COMPOSITOR_TEST_UTILS_H_
#define UI_GFX_COMPOSITOR_TEST_UTILS_H_
#ifndef UI_GFX_COMPOSITOR_TEST_TEST_UTILS_H_
#define UI_GFX_COMPOSITOR_TEST_TEST_UTILS_H_
#pragma once
namespace gfx {
......@@ -19,4 +19,4 @@ void CheckApproximatelyEqual(const gfx::Rect& lhs, const gfx::Rect& rhs);
} // namespace ui
#endif // UI_GFX_COMPOSITOR_TEST_UTILS_H_
#endif // UI_GFX_COMPOSITOR_TEST_TEST_UTILS_H_
......@@ -7,7 +7,7 @@
#if defined(VIEWS_COMPOSITOR)
#include "base/command_line.h"
#include "ui/gfx/compositor/compositor.h"
#include "ui/gfx/compositor/test_compositor.h"
#include "ui/gfx/compositor/test/test_compositor.h"
#endif
#if defined(VIEWS_COMPOSITOR)
......
......@@ -5,7 +5,7 @@
#include "base/test/test_suite.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/gfx/compositor/compositor_test_support.h"
#include "ui/gfx/compositor/test/compositor_test_support.h"
#include "ui/gfx/test/gfx_test_utils.h"
#include "views/view.h"
......
......@@ -17,8 +17,8 @@
#include "ui/gfx/compositor/compositor.h"
#include "ui/gfx/compositor/layer.h"
#include "ui/gfx/compositor/layer_animator.h"
#include "ui/gfx/compositor/test_compositor.h"
#include "ui/gfx/compositor/test_texture.h"
#include "ui/gfx/compositor/test/test_compositor.h"
#include "ui/gfx/compositor/test/test_texture.h"
#include "ui/gfx/path.h"
#include "ui/gfx/transform.h"
#include "ui/views/test/views_test_base.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment