Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Side by Side Diff: chrome/browser/web_resource/promo_resource_service_unittest.cc

Issue 12223091: Split testing_pref_service.h/.cc into two parts, generic vs. Chrome-specific. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/prefs/pref_service.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/time.h" 13 #include "base/time.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/prefs/browser_prefs.h" 17 #include "chrome/browser/prefs/browser_prefs.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_syncable.h"
Mattias Nissler (ping if slow) 2013/02/12 13:53:32 testing_pref_service.h suffices?
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"
28 #include "testing/gtest/include/gtest/gtest.h" 28 #include "testing/gtest/include/gtest/gtest.h"
29 #include "third_party/icu/public/i18n/unicode/smpdtfmt.h" 29 #include "third_party/icu/public/i18n/unicode/smpdtfmt.h"
30 30
31 namespace { 31 namespace {
32 32
33 const char kDateFormat[] = "dd MMM yyyy HH:mm:ss zzz"; 33 const char kDateFormat[] = "dd MMM yyyy HH:mm:ss zzz";
34 34
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698