| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/test/test_simple_task_runner.h" | 12 #include "base/test/test_simple_task_runner.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "third_party/skia/include/core/SkPixelRef.h" |
| 14 #include "ui/aura/test/aura_test_helper.h" | 15 #include "ui/aura/test/aura_test_helper.h" |
| 15 #include "ui/aura/test/test_screen.h" | 16 #include "ui/aura/test/test_screen.h" |
| 16 #include "ui/aura/test/test_window_delegate.h" | 17 #include "ui/aura/test/test_window_delegate.h" |
| 17 #include "ui/aura/test/test_windows.h" | 18 #include "ui/aura/test/test_windows.h" |
| 18 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
| 19 #include "ui/aura/window_event_dispatcher.h" | 20 #include "ui/aura/window_event_dispatcher.h" |
| 20 #include "ui/compositor/compositor.h" | 21 #include "ui/compositor/compositor.h" |
| 21 #include "ui/compositor/layer.h" | 22 #include "ui/compositor/layer.h" |
| 22 #include "ui/compositor/paint_recorder.h" | 23 #include "ui/compositor/paint_recorder.h" |
| 23 #include "ui/compositor/test/context_factories_for_test.h" | 24 #include "ui/compositor/test/context_factories_for_test.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 gfx::SizeF snapshot_size(test_bounds.size()); | 296 gfx::SizeF snapshot_size(test_bounds.size()); |
| 296 snapshot_size.Scale(2.0f); | 297 snapshot_size.Scale(2.0f); |
| 297 | 298 |
| 298 gfx::Image snapshot = GrabSnapshotForTestWindow(); | 299 gfx::Image snapshot = GrabSnapshotForTestWindow(); |
| 299 EXPECT_EQ(gfx::ToRoundedSize(snapshot_size).ToString(), | 300 EXPECT_EQ(gfx::ToRoundedSize(snapshot_size).ToString(), |
| 300 snapshot.Size().ToString()); | 301 snapshot.Size().ToString()); |
| 301 EXPECT_EQ(0u, GetFailedPixelsCountWithScaleFactor(snapshot, 2)); | 302 EXPECT_EQ(0u, GetFailedPixelsCountWithScaleFactor(snapshot, 2)); |
| 302 } | 303 } |
| 303 | 304 |
| 304 } // namespace ui | 305 } // namespace ui |
| OLD | NEW |