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

Unified Diff: ui/gfx/shadow_value_unittest.cc

Issue 884653003: gfx::ShadowValue: offset is a Vector2d, not Point. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile on Windows. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/shadow_value.cc ('k') | ui/message_center/views/message_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/shadow_value_unittest.cc
diff --git a/ui/gfx/shadow_value_unittest.cc b/ui/gfx/shadow_value_unittest.cc
index 4cb717eeedd221834277dfd195bc28da94fd2b55..c89ea9b43fd89518af1bf22b4fa12387a9450513 100644
--- a/ui/gfx/shadow_value_unittest.cc
+++ b/ui/gfx/shadow_value_unittest.cc
@@ -5,6 +5,7 @@
#include "base/basictypes.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/insets.h"
+#include "ui/gfx/geometry/vector2d.h"
#include "ui/gfx/shadow_value.h"
namespace gfx {
@@ -15,40 +16,46 @@ TEST(ShadowValueTest, GetMargin) {
size_t shadow_count;
ShadowValue shadows[2];
} kTestCases[] = {
- {
- Insets(), 0, {},
- },
- {
- Insets(-2, -2, -2, -2),
- 1,
- { ShadowValue(gfx::Point(0, 0), 4, 0), },
- },
- {
- Insets(0, -1, -4, -3),
- 1,
- { ShadowValue(gfx::Point(1, 2), 4, 0), },
- },
- {
- Insets(-4, -3, 0, -1),
- 1,
- { ShadowValue(gfx::Point(-1, -2), 4, 0), },
- },
- {
- Insets(0, -1, -5, -4),
- 2,
{
- ShadowValue(gfx::Point(1, 2), 4, 0),
- ShadowValue(gfx::Point(2, 3), 4, 0),
+ Insets(), 0, {},
danakj 2015/02/24 17:26:55 This indenting looks weird, did git cl format do t
Matt Giuca 2015/02/24 23:04:21 It did. I don't know why it likes 1-space indents
danakj 2015/02/24 23:07:17 Accept it and file a bug please.
Matt Giuca 2015/02/25 04:34:41 Done. (b/19503635) I'm not sure why you want me t
danakj 2015/02/25 19:04:24 Well, because otherwise other people who touch the
Matt Giuca 2015/02/26 03:19:19 OK done. (I think it's especially good to not be d
},
- },
- {
- Insets(-4, -3, -5, -4),
- 2,
{
- ShadowValue(gfx::Point(-1, -2), 4, 0),
- ShadowValue(gfx::Point(2, 3), 4, 0),
+ Insets(-2, -2, -2, -2),
+ 1,
+ {
+ ShadowValue(gfx::Vector2d(0, 0), 4, 0),
+ },
+ },
+ {
+ Insets(0, -1, -4, -3),
+ 1,
+ {
+ ShadowValue(gfx::Vector2d(1, 2), 4, 0),
+ },
+ },
+ {
+ Insets(-4, -3, 0, -1),
+ 1,
+ {
+ ShadowValue(gfx::Vector2d(-1, -2), 4, 0),
+ },
+ },
+ {
+ Insets(0, -1, -5, -4),
+ 2,
+ {
+ ShadowValue(gfx::Vector2d(1, 2), 4, 0),
+ ShadowValue(gfx::Vector2d(2, 3), 4, 0),
+ },
+ },
+ {
+ Insets(-4, -3, -5, -4),
+ 2,
+ {
+ ShadowValue(gfx::Vector2d(-1, -2), 4, 0),
+ ShadowValue(gfx::Vector2d(2, 3), 4, 0),
+ },
},
- },
};
for (size_t i = 0; i < arraysize(kTestCases); ++i) {
« no previous file with comments | « ui/gfx/shadow_value.cc ('k') | ui/message_center/views/message_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698