| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/message_center/views/message_center_view.h" | 5 #include "ui/message_center/views/message_center_view.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 } | 392 } |
| 393 | 393 |
| 394 void MessageCenterViewTest::RegisterCall(CallType type) { | 394 void MessageCenterViewTest::RegisterCall(CallType type) { |
| 395 callCounts_[type] += 1; | 395 callCounts_[type] += 1; |
| 396 } | 396 } |
| 397 | 397 |
| 398 void MessageCenterViewTest::FireOnMouseExitedEvent() { | 398 void MessageCenterViewTest::FireOnMouseExitedEvent() { |
| 399 ui::MouseEvent dummy_event( | 399 ui::MouseEvent dummy_event( |
| 400 ui::ET_MOUSE_EXITED /* type */, gfx::Point(0, 0) /* location */, | 400 ui::ET_MOUSE_EXITED /* type */, gfx::Point(0, 0) /* location */, |
| 401 gfx::Point(0, 0) /* root location */, base::TimeTicks() /* time_stamp */, | 401 gfx::Point(0, 0) /* root location */, base::TimeTicks() /* time_stamp */, |
| 402 0 /* flags */, 0 /*changed_button_flags */); | 402 0 /* flags */, 0 /*changed_button_flags */, |
| 403 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
| 403 message_center_view_->OnMouseExited(dummy_event); | 404 message_center_view_->OnMouseExited(dummy_event); |
| 404 } | 405 } |
| 405 | 406 |
| 406 void MessageCenterViewTest::LogBounds(int depth, views::View* view) { | 407 void MessageCenterViewTest::LogBounds(int depth, views::View* view) { |
| 407 base::string16 inset; | 408 base::string16 inset; |
| 408 for (int i = 0; i < depth; ++i) | 409 for (int i = 0; i < depth; ++i) |
| 409 inset.append(base::UTF8ToUTF16(" ")); | 410 inset.append(base::UTF8ToUTF16(" ")); |
| 410 gfx::Rect bounds = view->bounds(); | 411 gfx::Rect bounds = view->bounds(); |
| 411 DVLOG(0) << inset << bounds.width() << " x " << bounds.height() | 412 DVLOG(0) << inset << bounds.width() << " x " << bounds.height() |
| 412 << " @ " << bounds.x() << ", " << bounds.y(); | 413 << " @ " << bounds.x() << ", " << bounds.y(); |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 base::UTF8ToUTF16("title1"), base::UTF8ToUTF16("message"), gfx::Image(), | 946 base::UTF8ToUTF16("title1"), base::UTF8ToUTF16("message"), gfx::Image(), |
| 946 base::UTF8ToUTF16("display source"), GURL(), | 947 base::UTF8ToUTF16("display source"), GURL(), |
| 947 NotifierId(NotifierId::APPLICATION, "extension_id"), | 948 NotifierId(NotifierId::APPLICATION, "extension_id"), |
| 948 message_center::RichNotificationData(), nullptr)); | 949 message_center::RichNotificationData(), nullptr)); |
| 949 | 950 |
| 950 GetMessageCenterView()->SizeToPreferredSize(); | 951 GetMessageCenterView()->SizeToPreferredSize(); |
| 951 EXPECT_NE(kEmptyMessageCenterViewHeight, GetMessageCenterView()->height()); | 952 EXPECT_NE(kEmptyMessageCenterViewHeight, GetMessageCenterView()->height()); |
| 952 } | 953 } |
| 953 | 954 |
| 954 } // namespace message_center | 955 } // namespace message_center |
| OLD | NEW |