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 <algorithm> | 5 #include <algorithm> |
6 #include <cstdlib> | 6 #include <cstdlib> |
7 #include <map> | 7 #include <map> |
8 #include <sstream> | 8 #include <sstream> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 } | 594 } |
595 } | 595 } |
596 | 596 |
597 class PolicyPrefIndicatorTest | 597 class PolicyPrefIndicatorTest |
598 : public PolicyPrefsTest, | 598 : public PolicyPrefsTest, |
599 public testing::WithParamInterface<std::vector<std::string> > { | 599 public testing::WithParamInterface<std::vector<std::string> > { |
600 }; | 600 }; |
601 | 601 |
602 // Verifies that controlled setting indicators correctly show whether a pref's | 602 // Verifies that controlled setting indicators correctly show whether a pref's |
603 // value is recommended or enforced by a corresponding policy. | 603 // value is recommended or enforced by a corresponding policy. |
604 #if defined(OS_WIN) && !defined(NDEBUG) | 604 IN_PROC_BROWSER_TEST_P(PolicyPrefIndicatorTest, CheckPolicyIndicators) { |
605 // TODO(zea): Fix failure on Windows. See crbug.com/402233 for details. | |
606 #define MAYBE_CheckPolicyIndicators DISABLED_CheckPolicyIndicators | |
607 #else | |
608 #define MAYBE_CheckPolicyIndicators CheckPolicyIndicators | |
609 #endif | |
610 IN_PROC_BROWSER_TEST_P(PolicyPrefIndicatorTest, MAYBE_CheckPolicyIndicators) { | |
611 const PolicyTestCases test_cases; | 605 const PolicyTestCases test_cases; |
612 PrefService* local_state = g_browser_process->local_state(); | 606 PrefService* local_state = g_browser_process->local_state(); |
613 PrefService* user_prefs = browser()->profile()->GetPrefs(); | 607 PrefService* user_prefs = browser()->profile()->GetPrefs(); |
614 | 608 |
615 ui_test_utils::NavigateToURL(browser(), GURL(kMainSettingsPage)); | 609 ui_test_utils::NavigateToURL(browser(), GURL(kMainSettingsPage)); |
616 | 610 |
617 for (std::vector<std::string>::const_iterator policy = GetParam().begin(); | 611 for (std::vector<std::string>::const_iterator policy = GetParam().begin(); |
618 policy != GetParam().end(); | 612 policy != GetParam().end(); |
619 ++policy) { | 613 ++policy) { |
620 const std::vector<PolicyTestCase*>* policy_test_cases = | 614 const std::vector<PolicyTestCase*>* policy_test_cases = |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 } | 744 } |
751 } | 745 } |
752 } | 746 } |
753 } | 747 } |
754 | 748 |
755 INSTANTIATE_TEST_CASE_P(PolicyPrefIndicatorTestInstance, | 749 INSTANTIATE_TEST_CASE_P(PolicyPrefIndicatorTestInstance, |
756 PolicyPrefIndicatorTest, | 750 PolicyPrefIndicatorTest, |
757 testing::ValuesIn(SplitPoliciesIntoChunks(10))); | 751 testing::ValuesIn(SplitPoliciesIntoChunks(10))); |
758 | 752 |
759 } // namespace policy | 753 } // namespace policy |
OLD | NEW |