OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/resources/picture.h" | 5 #include "cc/resources/picture.h" |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "cc/test/fake_content_layer_client.h" | 10 #include "cc/test/fake_content_layer_client.h" |
11 #include "cc/test/skia_common.h" | 11 #include "cc/test/skia_common.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "third_party/skia/include/core/SkBBHFactory.h" | 13 #include "third_party/skia/include/core/SkBBHFactory.h" |
14 #include "third_party/skia/include/core/SkCanvas.h" | |
15 #include "third_party/skia/include/core/SkGraphics.h" | 14 #include "third_party/skia/include/core/SkGraphics.h" |
16 #include "third_party/skia/include/core/SkPixelRef.h" | 15 #include "ui/gfx/geometry/rect.h" |
17 #include "ui/gfx/rect.h" | |
18 #include "ui/gfx/skia_util.h" | 16 #include "ui/gfx/skia_util.h" |
19 | 17 |
20 namespace cc { | 18 namespace cc { |
21 namespace { | 19 namespace { |
22 | 20 |
23 TEST(PictureTest, AsBase64String) { | 21 TEST(PictureTest, AsBase64String) { |
24 SkGraphics::Init(); | 22 SkGraphics::Init(); |
25 | 23 |
26 gfx::Rect layer_rect(100, 100); | 24 gfx::Rect layer_rect(100, 100); |
27 | 25 |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 EXPECT_TRUE(content_layer_client.last_canvas() != NULL); | 466 EXPECT_TRUE(content_layer_client.last_canvas() != NULL); |
469 EXPECT_EQ(ContentLayerClient::GRAPHICS_CONTEXT_DISABLED, | 467 EXPECT_EQ(ContentLayerClient::GRAPHICS_CONTEXT_DISABLED, |
470 content_layer_client.last_context_status()); | 468 content_layer_client.last_context_status()); |
471 EXPECT_TRUE(picture.get()); | 469 EXPECT_TRUE(picture.get()); |
472 | 470 |
473 EXPECT_EQ(3, Picture::RECORDING_MODE_COUNT); | 471 EXPECT_EQ(3, Picture::RECORDING_MODE_COUNT); |
474 } | 472 } |
475 | 473 |
476 } // namespace | 474 } // namespace |
477 } // namespace cc | 475 } // namespace cc |
OLD | NEW |