OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/notifications/notification_conversion_helper.h" | 5 #include "chrome/browser/notifications/notification_conversion_helper.h" |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/notifications/notification.h" | 9 #include "chrome/browser/notifications/notification.h" |
9 #include "chrome/browser/notifications/notification_test_util.h" | 10 #include "chrome/browser/notifications/notification_test_util.h" |
10 #include "chrome/common/extensions/api/notifications.h" | 11 #include "chrome/common/extensions/api/notifications.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "third_party/skia/include/core/SkBitmap.h" | 13 #include "third_party/skia/include/core/SkBitmap.h" |
13 #include "ui/message_center/notification.h" | 14 #include "ui/message_center/notification.h" |
14 #include "ui/message_center/notification_types.h" | 15 #include "ui/message_center/notification_types.h" |
15 #include "url/gurl.h" | 16 #include "url/gurl.h" |
16 | 17 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 scoped_ptr<extensions::api::notifications::NotificationOptions> options3( | 112 scoped_ptr<extensions::api::notifications::NotificationOptions> options3( |
112 new extensions::api::notifications::NotificationOptions()); | 113 new extensions::api::notifications::NotificationOptions()); |
113 NotificationConversionHelper::NotificationToNotificationOptions( | 114 NotificationConversionHelper::NotificationToNotificationOptions( |
114 *(notification3), options3.get()); | 115 *(notification3), options3.get()); |
115 EXPECT_EQ(options3->type, extensions::api::notifications::TEMPLATE_TYPE_LIST); | 116 EXPECT_EQ(options3->type, extensions::api::notifications::TEMPLATE_TYPE_LIST); |
116 EXPECT_EQ(options3->items->at(0)->title, "Item 1 Title"); | 117 EXPECT_EQ(options3->items->at(0)->title, "Item 1 Title"); |
117 EXPECT_EQ(options3->items->at(0)->message, "Item 1 Message"); | 118 EXPECT_EQ(options3->items->at(0)->message, "Item 1 Message"); |
118 EXPECT_EQ(options3->items->at(1)->title, "Item 2 Title"); | 119 EXPECT_EQ(options3->items->at(1)->title, "Item 2 Title"); |
119 EXPECT_EQ(options3->items->at(1)->message, "Item 2 Message"); | 120 EXPECT_EQ(options3->items->at(1)->message, "Item 2 Message"); |
120 } | 121 } |
OLD | NEW |