| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/prefs/testing_pref_service.h" | |
| 12 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 14 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 15 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "components/prefs/testing_pref_service.h" |
| 16 #include "components/version_info/version_info.h" | 16 #include "components/version_info/version_info.h" |
| 17 #include "components/web_resource/notification_promo.h" | 17 #include "components/web_resource/notification_promo.h" |
| 18 #include "components/web_resource/notification_promo_mobile_ntp.h" | 18 #include "components/web_resource/notification_promo_mobile_ntp.h" |
| 19 #include "components/web_resource/promo_resource_service.h" | 19 #include "components/web_resource/promo_resource_service.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 version_info::Channel kChannel = version_info::Channel::UNKNOWN; | 23 version_info::Channel kChannel = version_info::Channel::UNKNOWN; |
| 24 } | 24 } |
| 25 | 25 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 promo_test.InitPromoFromJson(true); | 179 promo_test.InitPromoFromJson(true); |
| 180 | 180 |
| 181 // Second time should not trigger a notification. | 181 // Second time should not trigger a notification. |
| 182 promo_test.InitPromoFromJson(false); | 182 promo_test.InitPromoFromJson(false); |
| 183 | 183 |
| 184 promo_test.TestInitFromPrefs(); | 184 promo_test.TestInitFromPrefs(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace web_resource | 187 } // namespace web_resource |
| OLD | NEW |