OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) | 5 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) |
6 | 6 |
7 #include "chrome/browser/ui/webui/settings/metrics_reporting_handler.h" | 7 #include "chrome/browser/ui/webui/settings/metrics_reporting_handler.h" |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/run_loop.h" |
10 #include "base/values.h" | 11 #include "base/values.h" |
11 #include "chrome/test/base/scoped_testing_local_state.h" | 12 #include "chrome/test/base/scoped_testing_local_state.h" |
12 #include "chrome/test/base/testing_browser_process.h" | 13 #include "chrome/test/base/testing_browser_process.h" |
13 #include "components/metrics/metrics_pref_names.h" | 14 #include "components/metrics/metrics_pref_names.h" |
14 #include "components/policy/core/browser/browser_policy_connector.h" | 15 #include "components/policy/core/browser/browser_policy_connector.h" |
15 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 16 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
16 #include "components/policy/core/common/policy_map.h" | 17 #include "components/policy/core/common/policy_map.h" |
17 #include "components/policy/core/common/policy_types.h" | 18 #include "components/policy/core/common/policy_types.h" |
18 #include "components/prefs/pref_service.h" | 19 #include "components/prefs/pref_service.h" |
19 #include "content/public/browser/web_ui.h" | 20 #include "content/public/browser/web_ui.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 policy::POLICY_SOURCE_CLOUD, | 124 policy::POLICY_SOURCE_CLOUD, |
124 base::WrapUnique(new base::FundamentalValue(false)), | 125 base::WrapUnique(new base::FundamentalValue(false)), |
125 nullptr); | 126 nullptr); |
126 provider()->UpdateChromePolicy(*map()); | 127 provider()->UpdateChromePolicy(*map()); |
127 EXPECT_TRUE(test_web_ui()->call_data().empty()); | 128 EXPECT_TRUE(test_web_ui()->call_data().empty()); |
128 } | 129 } |
129 | 130 |
130 } // namespace settings | 131 } // namespace settings |
131 | 132 |
132 #endif // defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) | 133 #endif // defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) |
OLD | NEW |