Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(660)

Side by Side Diff: ui/snapshot/snapshot_aura_unittest.cc

Issue 832953002: Cleanup: Update the path to gfx size headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/native_theme/native_theme_win.h ('k') | ui/surface/accelerated_surface_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/test/aura_test_helper.h" 10 #include "ui/aura/test/aura_test_helper.h"
11 #include "ui/aura/test/test_screen.h" 11 #include "ui/aura/test/test_screen.h"
12 #include "ui/aura/test/test_window_delegate.h" 12 #include "ui/aura/test/test_window_delegate.h"
13 #include "ui/aura/test/test_windows.h" 13 #include "ui/aura/test/test_windows.h"
14 #include "ui/aura/window.h" 14 #include "ui/aura/window.h"
15 #include "ui/aura/window_event_dispatcher.h" 15 #include "ui/aura/window_event_dispatcher.h"
16 #include "ui/compositor/compositor.h" 16 #include "ui/compositor/compositor.h"
17 #include "ui/compositor/layer.h" 17 #include "ui/compositor/layer.h"
18 #include "ui/compositor/test/context_factories_for_test.h" 18 #include "ui/compositor/test/context_factories_for_test.h"
19 #include "ui/compositor/test/draw_waiter_for_test.h" 19 #include "ui/compositor/test/draw_waiter_for_test.h"
20 #include "ui/gfx/canvas.h" 20 #include "ui/gfx/canvas.h"
21 #include "ui/gfx/geometry/rect.h" 21 #include "ui/gfx/geometry/rect.h"
22 #include "ui/gfx/geometry/size_conversions.h"
22 #include "ui/gfx/gfx_paths.h" 23 #include "ui/gfx/gfx_paths.h"
23 #include "ui/gfx/image/image.h" 24 #include "ui/gfx/image/image.h"
24 #include "ui/gfx/size_conversions.h"
25 #include "ui/gfx/transform.h" 25 #include "ui/gfx/transform.h"
26 #include "ui/gl/gl_implementation.h" 26 #include "ui/gl/gl_implementation.h"
27 #include "ui/wm/core/default_activation_client.h" 27 #include "ui/wm/core/default_activation_client.h"
28 28
29 namespace ui { 29 namespace ui {
30 namespace { 30 namespace {
31 31
32 SkColor GetExpectedColorForPoint(int x, int y) { 32 SkColor GetExpectedColorForPoint(int x, int y) {
33 return SkColorSetRGB(std::min(x, 255), std::min(y, 255), 0); 33 return SkColorSetRGB(std::min(x, 255), std::min(y, 255), 0);
34 } 34 }
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 gfx::SizeF snapshot_size(test_bounds.size()); 283 gfx::SizeF snapshot_size(test_bounds.size());
284 snapshot_size.Scale(2.0f); 284 snapshot_size.Scale(2.0f);
285 285
286 gfx::Image snapshot = GrabSnapshotForTestWindow(); 286 gfx::Image snapshot = GrabSnapshotForTestWindow();
287 EXPECT_EQ(gfx::ToRoundedSize(snapshot_size).ToString(), 287 EXPECT_EQ(gfx::ToRoundedSize(snapshot_size).ToString(),
288 snapshot.Size().ToString()); 288 snapshot.Size().ToString());
289 EXPECT_EQ(0u, GetFailedPixelsCountWithScaleFactor(snapshot, 2)); 289 EXPECT_EQ(0u, GetFailedPixelsCountWithScaleFactor(snapshot, 2));
290 } 290 }
291 291
292 } // namespace ui 292 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_win.h ('k') | ui/surface/accelerated_surface_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698