| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/snapshot/snapshot.h" | 5 #include "ui/snapshot/snapshot.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/test/test_simple_task_runner.h" | 8 #include "base/test/test_simple_task_runner.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "ui/aura/root_window.h" | |
| 11 #include "ui/aura/test/aura_test_helper.h" | 10 #include "ui/aura/test/aura_test_helper.h" |
| 12 #include "ui/aura/test/test_screen.h" | 11 #include "ui/aura/test/test_screen.h" |
| 13 #include "ui/aura/test/test_window_delegate.h" | 12 #include "ui/aura/test/test_window_delegate.h" |
| 14 #include "ui/aura/test/test_windows.h" | 13 #include "ui/aura/test/test_windows.h" |
| 15 #include "ui/aura/window.h" | 14 #include "ui/aura/window.h" |
| 15 #include "ui/aura/window_event_dispatcher.h" |
| 16 #include "ui/compositor/layer.h" | 16 #include "ui/compositor/layer.h" |
| 17 #include "ui/compositor/test/context_factories_for_test.h" | 17 #include "ui/compositor/test/context_factories_for_test.h" |
| 18 #include "ui/compositor/test/draw_waiter_for_test.h" | 18 #include "ui/compositor/test/draw_waiter_for_test.h" |
| 19 #include "ui/gfx/canvas.h" | 19 #include "ui/gfx/canvas.h" |
| 20 #include "ui/gfx/gfx_paths.h" | 20 #include "ui/gfx/gfx_paths.h" |
| 21 #include "ui/gfx/image/image.h" | 21 #include "ui/gfx/image/image.h" |
| 22 #include "ui/gfx/rect.h" | 22 #include "ui/gfx/rect.h" |
| 23 #include "ui/gfx/size_conversions.h" | 23 #include "ui/gfx/size_conversions.h" |
| 24 #include "ui/gfx/transform.h" | 24 #include "ui/gfx/transform.h" |
| 25 #include "ui/gl/gl_implementation.h" | 25 #include "ui/gl/gl_implementation.h" |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 gfx::SizeF snapshot_size(test_bounds.size()); | 279 gfx::SizeF snapshot_size(test_bounds.size()); |
| 280 snapshot_size.Scale(2.0f); | 280 snapshot_size.Scale(2.0f); |
| 281 | 281 |
| 282 gfx::Image snapshot = GrabSnapshotForTestWindow(); | 282 gfx::Image snapshot = GrabSnapshotForTestWindow(); |
| 283 EXPECT_EQ(gfx::ToRoundedSize(snapshot_size).ToString(), | 283 EXPECT_EQ(gfx::ToRoundedSize(snapshot_size).ToString(), |
| 284 snapshot.Size().ToString()); | 284 snapshot.Size().ToString()); |
| 285 EXPECT_EQ(0u, GetFailedPixelsCountWithScaleFactor(snapshot, 2)); | 285 EXPECT_EQ(0u, GetFailedPixelsCountWithScaleFactor(snapshot, 2)); |
| 286 } | 286 } |
| 287 | 287 |
| 288 } // namespace ui | 288 } // namespace ui |
| OLD | NEW |