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 "base/base64.h" | 5 #include "base/base64.h" |
| 6 #include "base/prefs/testing_pref_service.h" |
6 #include "base/string_split.h" | 7 #include "base/string_split.h" |
7 #include "chrome/browser/metrics/proto/study.pb.h" | 8 #include "chrome/browser/metrics/proto/study.pb.h" |
8 #include "chrome/browser/metrics/variations/resource_request_allowed_notifier_te
st_util.h" | 9 #include "chrome/browser/metrics/variations/resource_request_allowed_notifier_te
st_util.h" |
9 #include "chrome/browser/metrics/variations/variations_service.h" | 10 #include "chrome/browser/metrics/variations/variations_service.h" |
10 #include "chrome/common/chrome_version_info.h" | 11 #include "chrome/common/chrome_version_info.h" |
11 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
12 #include "chrome/test/base/testing_browser_process.h" | 13 #include "chrome/test/base/testing_browser_process.h" |
13 #include "chrome/test/base/testing_pref_service.h" | |
14 #include "content/public/test/test_browser_thread.h" | 14 #include "content/public/test/test_browser_thread.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace chrome_variations { | 17 namespace chrome_variations { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // A test class used to validate expected functionality in VariationsService. | 21 // A test class used to validate expected functionality in VariationsService. |
22 class TestVariationsService : public VariationsService { | 22 class TestVariationsService : public VariationsService { |
23 public: | 23 public: |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 // manipulate it for this test. | 512 // manipulate it for this test. |
513 TestRequestAllowedNotifier* test_notifier = new TestRequestAllowedNotifier; | 513 TestRequestAllowedNotifier* test_notifier = new TestRequestAllowedNotifier; |
514 TestVariationsService test_service(test_notifier); | 514 TestVariationsService test_service(test_notifier); |
515 | 515 |
516 test_notifier->SetRequestsAllowedOverride(true); | 516 test_notifier->SetRequestsAllowedOverride(true); |
517 test_service.StartRepeatedVariationsSeedFetch(); | 517 test_service.StartRepeatedVariationsSeedFetch(); |
518 EXPECT_TRUE(test_service.fetch_attempted()); | 518 EXPECT_TRUE(test_service.fetch_attempted()); |
519 } | 519 } |
520 | 520 |
521 } // namespace chrome_variations | 521 } // namespace chrome_variations |
OLD | NEW |