Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/views/bubble/bubble_border.h" | 5 #include "ui/views/bubble/bubble_border.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | |
| 7 #include "ui/views/test/views_test_base.h" | 8 #include "ui/views/test/views_test_base.h" |
| 8 | 9 |
| 9 namespace views { | 10 namespace views { |
| 10 | 11 |
| 11 typedef ViewsTestBase BubbleBorderTest; | 12 typedef ViewsTestBase BubbleBorderTest; |
| 12 | 13 |
| 13 TEST_F(BubbleBorderTest, GetMirroredArrow) { | 14 TEST_F(BubbleBorderTest, GetMirroredArrow) { |
| 14 // Horizontal mirroring. | 15 // Horizontal mirroring. |
| 15 EXPECT_EQ(BubbleBorder::TOP_RIGHT, | 16 EXPECT_EQ(BubbleBorder::TOP_RIGHT, |
| 16 BubbleBorder::horizontal_mirror(BubbleBorder::TOP_LEFT)); | 17 BubbleBorder::horizontal_mirror(BubbleBorder::TOP_LEFT)); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 EXPECT_TRUE(BubbleBorder::is_arrow_at_center(BubbleBorder::TOP_CENTER)); | 196 EXPECT_TRUE(BubbleBorder::is_arrow_at_center(BubbleBorder::TOP_CENTER)); |
| 196 EXPECT_TRUE(BubbleBorder::is_arrow_at_center(BubbleBorder::BOTTOM_CENTER)); | 197 EXPECT_TRUE(BubbleBorder::is_arrow_at_center(BubbleBorder::BOTTOM_CENTER)); |
| 197 | 198 |
| 198 EXPECT_TRUE(BubbleBorder::is_arrow_at_center(BubbleBorder::LEFT_CENTER)); | 199 EXPECT_TRUE(BubbleBorder::is_arrow_at_center(BubbleBorder::LEFT_CENTER)); |
| 199 EXPECT_TRUE(BubbleBorder::is_arrow_at_center(BubbleBorder::RIGHT_CENTER)); | 200 EXPECT_TRUE(BubbleBorder::is_arrow_at_center(BubbleBorder::RIGHT_CENTER)); |
| 200 | 201 |
| 201 EXPECT_FALSE(BubbleBorder::is_arrow_at_center(BubbleBorder::NONE)); | 202 EXPECT_FALSE(BubbleBorder::is_arrow_at_center(BubbleBorder::NONE)); |
| 202 EXPECT_FALSE(BubbleBorder::is_arrow_at_center(BubbleBorder::FLOAT)); | 203 EXPECT_FALSE(BubbleBorder::is_arrow_at_center(BubbleBorder::FLOAT)); |
| 203 } | 204 } |
| 204 | 205 |
| 205 TEST_F(BubbleBorderTest, TestMinimalSize) { | 206 class BubbleBorderGetBoundsSizeTest : public views::ViewsTestBase { |
|
msw
2014/08/11 22:26:33
Merge the two test classes, they're similar enough
bruthig
2014/08/19 19:02:13
Done.
| |
| 206 gfx::Rect anchor = gfx::Rect(100, 100, 20, 20); | 207 public: |
| 207 gfx::Size contents = gfx::Size(10, 10); | 208 const BubbleBorder::Arrow kHorizontalArrow = BubbleBorder::TOP_CENTER; |
|
msw
2014/08/11 22:26:32
nit: inline these constants, they're only used onc
bruthig
2014/08/19 19:02:13
Done.
| |
| 208 BubbleBorder b1(BubbleBorder::RIGHT_TOP, BubbleBorder::NO_SHADOW, 0); | 209 const BubbleBorder::Arrow kVerticalArrow = BubbleBorder::LEFT_CENTER; |
| 209 | 210 |
| 210 // The height should be much bigger then the requested size + border and | 211 const gfx::Size kSmallSize = gfx::Size(1, 1); |
| 211 // padding since it needs to be able to include the tip bitmap. | 212 const gfx::Size kMediumSize = gfx::Size(50, 50); |
| 212 gfx::Rect visible_tip_1 = b1.GetBounds(anchor, contents); | 213 |
| 213 EXPECT_GE(visible_tip_1.height(), 30); | 214 BubbleBorderGetBoundsSizeTest() {} |
| 214 EXPECT_LE(visible_tip_1.width(), 30); | 215 virtual ~BubbleBorderGetBoundsSizeTest() {} |
| 215 | 216 |
| 216 // With the tip being invisible the height should now be much smaller. | 217 virtual gfx::Size GetSize(gfx::Size contents_size) { |
|
msw
2014/08/11 22:26:33
Make these member functions protected and non-virt
bruthig
2014/08/19 19:02:13
Done.
| |
| 217 b1.set_paint_arrow(BubbleBorder::PAINT_TRANSPARENT); | 218 DCHECK(bubble_border_); |
|
msw
2014/08/11 22:26:32
Remove DCHECKs before accessing the member.
bruthig
2014/08/19 19:02:13
Done.
| |
| 218 gfx::Rect invisible_tip_1 = b1.GetBounds(anchor, contents); | 219 return bubble_border_->GetBounds(gfx::Rect(100, 100, 0, 0), |
| 219 EXPECT_LE(invisible_tip_1.height(), 30); | 220 contents_size).size(); |
| 220 EXPECT_LE(invisible_tip_1.width(), 30); | 221 } |
| 221 | 222 |
| 222 // When the orientation of the tip changes, the above mentioned tests need to | 223 virtual void CreateBubbleBorder(BubbleBorder::Arrow arrow) { |
| 223 // be reverse for width and height. | 224 bubble_border_.reset(new BubbleBorder(arrow, |
| 224 BubbleBorder b2(BubbleBorder::TOP_RIGHT, BubbleBorder::NO_SHADOW, 0); | 225 BubbleBorder::NO_SHADOW, |
| 225 | 226 0 /* color */)); |
|
msw
2014/08/11 22:26:33
nit: just use SK_ColorWHITE or similar and remove
bruthig
2014/08/19 19:02:13
Done.
| |
| 226 // The width should be much bigger then the requested size + border and | 227 } |
| 227 // padding since it needs to be able to include the tip bitmap. | 228 |
| 228 gfx::Rect visible_tip_2 = b2.GetBounds(anchor, contents); | 229 virtual bool HasArrow() { |
| 229 EXPECT_GE(visible_tip_2.width(), 30); | 230 DCHECK(bubble_border_); |
| 230 EXPECT_LE(visible_tip_2.height(), 30); | 231 return BubbleBorder::has_arrow(bubble_border_->arrow()); |
| 231 | 232 } |
| 232 // With the tip being invisible the width should now be much smaller. | 233 |
| 233 b2.set_paint_arrow(BubbleBorder::PAINT_TRANSPARENT); | 234 virtual void SetPaintArrow(BubbleBorder::ArrowPaintType value) { |
| 234 gfx::Rect invisible_tip_2 = b2.GetBounds(anchor, contents); | 235 DCHECK(bubble_border_); |
| 235 EXPECT_LE(invisible_tip_2.width(), 30); | 236 bubble_border_->set_paint_arrow(value); |
| 236 EXPECT_LE(invisible_tip_2.height(), 30); | 237 } |
| 237 } | 238 |
| 238 | 239 private: |
| 240 scoped_ptr<BubbleBorder> bubble_border_; | |
| 241 | |
| 242 DISALLOW_COPY_AND_ASSIGN(BubbleBorderGetBoundsSizeTest); | |
| 243 }; | |
| 244 | |
| 245 TEST_F(BubbleBorderGetBoundsSizeTest, WithHorizontalArrow) { | |
| 246 CreateBubbleBorder(kHorizontalArrow); | |
| 247 | |
| 248 ASSERT_TRUE(HasArrow()); | |
| 249 | |
| 250 SetPaintArrow(BubbleBorder::PAINT_NORMAL); | |
| 251 EXPECT_EQ(gfx::Size(45, 29), GetSize(kSmallSize)); | |
|
msw
2014/08/11 22:26:32
These values won't be robust to bubble asset chang
bruthig
2014/08/19 19:02:13
Done.
| |
| 252 EXPECT_EQ(gfx::Size(60, 67), GetSize(kMediumSize)); | |
| 253 | |
| 254 SetPaintArrow(BubbleBorder::PAINT_TRANSPARENT); | |
| 255 EXPECT_EQ(gfx::Size(45, 29), GetSize(kSmallSize)); | |
| 256 EXPECT_EQ(gfx::Size(60, 67), GetSize(kMediumSize)); | |
| 257 | |
| 258 SetPaintArrow(BubbleBorder::PAINT_NONE); | |
| 259 EXPECT_EQ(gfx::Size(22, 22), GetSize(kSmallSize)); | |
| 260 EXPECT_EQ(gfx::Size(60, 60), GetSize(kMediumSize)); | |
| 261 } | |
| 262 | |
| 263 TEST_F(BubbleBorderGetBoundsSizeTest, WithVerticalArrow) { | |
| 264 CreateBubbleBorder(kVerticalArrow); | |
| 265 | |
| 266 ASSERT_TRUE(HasArrow()); | |
| 267 | |
| 268 SetPaintArrow(BubbleBorder::PAINT_NORMAL); | |
| 269 EXPECT_EQ(gfx::Size(29, 45), GetSize(kSmallSize)); | |
| 270 EXPECT_EQ(gfx::Size(67, 60), GetSize(kMediumSize)); | |
| 271 | |
| 272 SetPaintArrow(BubbleBorder::PAINT_TRANSPARENT); | |
| 273 EXPECT_EQ(gfx::Size(29, 45), GetSize(kSmallSize)); | |
| 274 EXPECT_EQ(gfx::Size(67, 60), GetSize(kMediumSize)); | |
| 275 | |
| 276 SetPaintArrow(BubbleBorder::PAINT_NONE); | |
| 277 EXPECT_EQ(gfx::Size(22, 22), GetSize(kSmallSize)); | |
| 278 EXPECT_EQ(gfx::Size(60, 60), GetSize(kMediumSize)); | |
| 279 } | |
| 280 | |
| 281 TEST_F(BubbleBorderGetBoundsSizeTest, WithoutArrow) { | |
| 282 CreateBubbleBorder(BubbleBorder::NONE); | |
| 283 | |
| 284 ASSERT_FALSE(HasArrow()); | |
| 285 | |
| 286 SetPaintArrow(BubbleBorder::PAINT_NORMAL); | |
| 287 EXPECT_EQ(gfx::Size(22, 22), GetSize(kSmallSize)); | |
| 288 EXPECT_EQ(gfx::Size(60, 60), GetSize(kMediumSize)); | |
| 289 | |
| 290 SetPaintArrow(BubbleBorder::PAINT_TRANSPARENT); | |
| 291 EXPECT_EQ(gfx::Size(22, 22), GetSize(kSmallSize)); | |
| 292 EXPECT_EQ(gfx::Size(60, 60), GetSize(kMediumSize)); | |
| 293 | |
| 294 SetPaintArrow(BubbleBorder::PAINT_NONE); | |
| 295 EXPECT_EQ(gfx::Size(22, 22), GetSize(kSmallSize)); | |
| 296 EXPECT_EQ(gfx::Size(60, 60), GetSize(kMediumSize)); | |
| 297 } | |
| 298 | |
| 299 TEST_F(BubbleBorderGetBoundsSizeTest, WithFloatArrow) { | |
| 300 CreateBubbleBorder(BubbleBorder::FLOAT); | |
| 301 | |
| 302 ASSERT_FALSE(HasArrow()); | |
| 303 | |
| 304 SetPaintArrow(BubbleBorder::PAINT_NORMAL); | |
| 305 EXPECT_EQ(gfx::Size(22, 22), GetSize(kSmallSize)); | |
| 306 EXPECT_EQ(gfx::Size(60, 60), GetSize(kMediumSize)); | |
| 307 | |
| 308 SetPaintArrow(BubbleBorder::PAINT_TRANSPARENT); | |
| 309 EXPECT_EQ(gfx::Size(22, 22), GetSize(kSmallSize)); | |
| 310 EXPECT_EQ(gfx::Size(60, 60), GetSize(kMediumSize)); | |
| 311 | |
| 312 SetPaintArrow(BubbleBorder::PAINT_NONE); | |
| 313 EXPECT_EQ(gfx::Size(22, 22), GetSize(kSmallSize)); | |
| 314 EXPECT_EQ(gfx::Size(60, 60), GetSize(kMediumSize)); | |
| 315 } | |
| 316 | |
| 317 class BubbleBorderGetBoundsOriginTest : public views::ViewsTestBase { | |
| 318 public: | |
| 319 const gfx::Rect kEmptyAnchor = gfx::Rect(100, 100, 0, 0); | |
| 320 const gfx::Rect kNonEmptyAnchor = gfx::Rect(100, 100, 20, 20); | |
| 321 | |
| 322 gfx::Size kContentsSize = gfx::Size(50, 50); | |
| 323 | |
| 324 BubbleBorderGetBoundsOriginTest() {} | |
| 325 virtual ~BubbleBorderGetBoundsOriginTest() {} | |
| 326 | |
| 327 virtual void CreateBubbleBorder(BubbleBorder::Arrow arrow) { | |
| 328 bubble_border_.reset(new BubbleBorder(arrow, | |
| 329 BubbleBorder::NO_SHADOW, | |
| 330 0 /* color */)); | |
| 331 } | |
| 332 | |
| 333 virtual void SetAlignment(BubbleBorder::BubbleAlignment alignment) { | |
| 334 DCHECK(bubble_border_); | |
| 335 bubble_border_->set_alignment(alignment); | |
| 336 } | |
| 337 | |
| 338 virtual gfx::Point GetOrigin(gfx::Rect anchor, gfx::Size contents_size) { | |
|
msw
2014/08/11 22:26:33
nit: remove |contents_size| and send |kContentsSiz
bruthig
2014/08/19 19:02:13
Done.
| |
| 339 DCHECK(bubble_border_); | |
| 340 return bubble_border_->GetBounds(anchor, contents_size).origin(); | |
| 341 } | |
| 342 | |
| 343 private: | |
| 344 scoped_ptr<BubbleBorder> bubble_border_; | |
| 345 | |
| 346 DISALLOW_COPY_AND_ASSIGN(BubbleBorderGetBoundsOriginTest); | |
| 347 }; | |
| 348 | |
| 349 TEST_F(BubbleBorderGetBoundsOriginTest, ArrowIsHorizontalLeft) { | |
| 350 CreateBubbleBorder(BubbleBorder::TOP_LEFT); | |
| 351 | |
| 352 SetAlignment(BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); | |
| 353 EXPECT_EQ(gfx::Point(78, 96), GetOrigin(kEmptyAnchor, kContentsSize)); | |
|
msw
2014/08/11 22:26:33
Ditto; can you make this more robust with somethin
bruthig
2014/08/19 19:02:13
Done.
| |
| 354 EXPECT_EQ(gfx::Point(88, 116), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 355 | |
| 356 SetAlignment(BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | |
| 357 EXPECT_EQ(gfx::Point(96, 96), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 358 EXPECT_EQ(gfx::Point(96, 116), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 359 } | |
| 360 | |
| 361 TEST_F(BubbleBorderGetBoundsOriginTest, ArrowIsHorizontalCenter) { | |
| 362 CreateBubbleBorder(BubbleBorder::TOP_CENTER); | |
| 363 | |
| 364 SetAlignment(BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); | |
| 365 EXPECT_EQ(gfx::Point(70, 96), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 366 EXPECT_EQ(gfx::Point(80, 116), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 367 | |
| 368 SetAlignment(BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | |
| 369 EXPECT_EQ(gfx::Point(70, 96), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 370 EXPECT_EQ(gfx::Point(80, 116), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 371 } | |
| 372 | |
| 373 TEST_F(BubbleBorderGetBoundsOriginTest, ArrowIsHorizontalRight) { | |
| 374 CreateBubbleBorder(BubbleBorder::TOP_RIGHT); | |
| 375 | |
| 376 SetAlignment(BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); | |
| 377 EXPECT_EQ(gfx::Point(62, 96), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 378 EXPECT_EQ(gfx::Point(72, 116), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 379 | |
| 380 SetAlignment(BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | |
| 381 EXPECT_EQ(gfx::Point(44, 96), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 382 EXPECT_EQ(gfx::Point(64, 116), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 383 } | |
| 384 | |
| 385 TEST_F(BubbleBorderGetBoundsOriginTest, ArrowIsHorizontalBottom) { | |
| 386 CreateBubbleBorder(BubbleBorder::BOTTOM_LEFT); | |
| 387 | |
| 388 SetAlignment(BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); | |
| 389 EXPECT_EQ(gfx::Point(78, 37), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 390 EXPECT_EQ(gfx::Point(88, 37), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 391 | |
| 392 SetAlignment(BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | |
| 393 EXPECT_EQ(gfx::Point(96, 37), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 394 EXPECT_EQ(gfx::Point(96, 37), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 395 } | |
| 396 | |
| 397 TEST_F(BubbleBorderGetBoundsOriginTest, ArrowIsVerticalTop) { | |
| 398 CreateBubbleBorder(BubbleBorder::LEFT_TOP); | |
| 399 | |
| 400 SetAlignment(BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); | |
| 401 EXPECT_EQ(gfx::Point(96, 78), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 402 EXPECT_EQ(gfx::Point(116, 88), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 403 | |
| 404 SetAlignment(BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | |
| 405 EXPECT_EQ(gfx::Point(96, 96), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 406 EXPECT_EQ(gfx::Point(116, 96), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 407 } | |
| 408 | |
| 409 TEST_F(BubbleBorderGetBoundsOriginTest, ArrowIsVerticalCenter) { | |
| 410 CreateBubbleBorder(BubbleBorder::LEFT_CENTER); | |
| 411 | |
| 412 SetAlignment(BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); | |
| 413 EXPECT_EQ(gfx::Point(96, 70), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 414 EXPECT_EQ(gfx::Point(116, 80), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 415 | |
| 416 SetAlignment(BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | |
| 417 EXPECT_EQ(gfx::Point(96, 70), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 418 EXPECT_EQ(gfx::Point(116, 80), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 419 } | |
| 420 | |
| 421 TEST_F(BubbleBorderGetBoundsOriginTest, ArrowIsVerticalBottom) { | |
| 422 CreateBubbleBorder(BubbleBorder::LEFT_BOTTOM); | |
| 423 | |
| 424 SetAlignment(BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); | |
| 425 EXPECT_EQ(gfx::Point(96, 62), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 426 EXPECT_EQ(gfx::Point(116, 72), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 427 | |
| 428 SetAlignment(BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | |
| 429 EXPECT_EQ(gfx::Point(96, 44), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 430 EXPECT_EQ(gfx::Point(116, 64), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 431 } | |
| 432 | |
| 433 TEST_F(BubbleBorderGetBoundsOriginTest, ArrowIsVerticalRight) { | |
| 434 CreateBubbleBorder(BubbleBorder::RIGHT_CENTER); | |
| 435 | |
| 436 SetAlignment(BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); | |
| 437 EXPECT_EQ(gfx::Point(37, 70), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 438 EXPECT_EQ(gfx::Point(37, 80), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 439 | |
| 440 SetAlignment(BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | |
| 441 EXPECT_EQ(gfx::Point(37, 70), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 442 EXPECT_EQ(gfx::Point(37, 80), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 443 } | |
| 444 | |
| 445 TEST_F(BubbleBorderGetBoundsOriginTest, ArrowIsNone) { | |
| 446 CreateBubbleBorder(BubbleBorder::NONE); | |
| 447 | |
| 448 SetAlignment(BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); | |
| 449 EXPECT_EQ(gfx::Point(70, 100), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 450 EXPECT_EQ(gfx::Point(80, 120), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 451 | |
| 452 SetAlignment(BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | |
| 453 EXPECT_EQ(gfx::Point(70, 100), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 454 EXPECT_EQ(gfx::Point(80, 120), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 455 } | |
| 456 | |
| 457 TEST_F(BubbleBorderGetBoundsOriginTest, ArrowIsFloat) { | |
| 458 CreateBubbleBorder(BubbleBorder::FLOAT); | |
| 459 | |
| 460 SetAlignment(BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); | |
| 461 EXPECT_EQ(gfx::Point(70, 70), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 462 EXPECT_EQ(gfx::Point(80, 80), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 463 | |
| 464 SetAlignment(BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | |
| 465 EXPECT_EQ(gfx::Point(70, 70), GetOrigin(kEmptyAnchor, kContentsSize)); | |
| 466 EXPECT_EQ(gfx::Point(80, 80), GetOrigin(kNonEmptyAnchor, kContentsSize)); | |
| 467 } | |
| 239 | 468 |
| 240 } // namespace views | 469 } // namespace views |
| OLD | NEW |