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 <utility> | 5 #include <utility> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/prefs/pref_service.h" |
10 #include "base/string_util.h" | 11 #include "base/string_util.h" |
11 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
12 #include "base/time.h" | 13 #include "base/time.h" |
13 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
14 #include "base/values.h" | 15 #include "base/values.h" |
15 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/prefs/browser_prefs.h" | 17 #include "chrome/browser/prefs/browser_prefs.h" |
17 #include "chrome/browser/prefs/pref_service.h" | |
18 #include "chrome/browser/web_resource/notification_promo.h" | 18 #include "chrome/browser/web_resource/notification_promo.h" |
19 #include "chrome/browser/web_resource/promo_resource_service.h" | 19 #include "chrome/browser/web_resource/promo_resource_service.h" |
20 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
22 #include "chrome/common/url_constants.h" | 22 #include "chrome/common/url_constants.h" |
23 #include "chrome/test/base/testing_browser_process.h" | 23 #include "chrome/test/base/testing_browser_process.h" |
24 #include "chrome/test/base/testing_pref_service.h" | 24 #include "chrome/test/base/testing_pref_service.h" |
25 #include "content/public/browser/notification_registrar.h" | 25 #include "content/public/browser/notification_registrar.h" |
26 #include "content/public/browser/notification_service.h" | 26 #include "content/public/browser/notification_service.h" |
27 #include "net/url_request/test_url_fetcher_factory.h" | 27 #include "net/url_request/test_url_fetcher_factory.h" |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 promo_test.TestInitFromPrefs(); | 523 promo_test.TestInitFromPrefs(); |
524 } | 524 } |
525 | 525 |
526 TEST_F(PromoResourceServiceTest, PromoServerURLTest) { | 526 TEST_F(PromoResourceServiceTest, PromoServerURLTest) { |
527 GURL promo_server_url = NotificationPromo::PromoServerURL(); | 527 GURL promo_server_url = NotificationPromo::PromoServerURL(); |
528 EXPECT_FALSE(promo_server_url.is_empty()); | 528 EXPECT_FALSE(promo_server_url.is_empty()); |
529 EXPECT_TRUE(promo_server_url.is_valid()); | 529 EXPECT_TRUE(promo_server_url.is_valid()); |
530 EXPECT_TRUE(promo_server_url.SchemeIs(chrome::kHttpsScheme)); | 530 EXPECT_TRUE(promo_server_url.SchemeIs(chrome::kHttpsScheme)); |
531 // TODO(achuith): Test this better. | 531 // TODO(achuith): Test this better. |
532 } | 532 } |
OLD | NEW |