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

Side by Side Diff: chrome/browser/policy/policy_prefs_browsertest.cc

Issue 108513011: Move chrome/app/policy into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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
« no previous file with comments | « chrome/app/policy/syntax_check_policy_template_json.py ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 << "Expected to find at least one visible controlled setting " 426 << "Expected to find at least one visible controlled setting "
427 << "indicator."; 427 << "indicator.";
428 } 428 }
429 } 429 }
430 430
431 } // namespace 431 } // namespace
432 432
433 TEST(PolicyPrefsTestCoverageTest, AllPoliciesHaveATestCase) { 433 TEST(PolicyPrefsTestCoverageTest, AllPoliciesHaveATestCase) {
434 // Verifies that all known policies have a test case in the JSON file. 434 // Verifies that all known policies have a test case in the JSON file.
435 // This test fails when a policy is added to 435 // This test fails when a policy is added to
436 // chrome/app/policy/policy_templates.json but a test case is not added to 436 // components/policy/resources/policy_templates.json but a test case is not
437 // chrome/test/data/policy/policy_test_cases.json. 437 // added to chrome/test/data/policy/policy_test_cases.json.
438 Schema chrome_schema = Schema::Wrap(GetChromeSchemaData()); 438 Schema chrome_schema = Schema::Wrap(GetChromeSchemaData());
439 ASSERT_TRUE(chrome_schema.valid()); 439 ASSERT_TRUE(chrome_schema.valid());
440 440
441 PolicyTestCases policy_test_cases; 441 PolicyTestCases policy_test_cases;
442 for (Schema::Iterator it = chrome_schema.GetPropertiesIterator(); 442 for (Schema::Iterator it = chrome_schema.GetPropertiesIterator();
443 !it.IsAtEnd(); it.Advance()) { 443 !it.IsAtEnd(); it.Advance()) {
444 EXPECT_TRUE(ContainsKey(policy_test_cases.map(), it.key())) 444 EXPECT_TRUE(ContainsKey(policy_test_cases.map(), it.key()))
445 << "Missing policy test case for: " << it.key(); 445 << "Missing policy test case for: " << it.key();
446 } 446 }
447 } 447 }
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 } 663 }
664 } 664 }
665 } 665 }
666 } 666 }
667 667
668 INSTANTIATE_TEST_CASE_P(PolicyPrefIndicatorTestInstance, 668 INSTANTIATE_TEST_CASE_P(PolicyPrefIndicatorTestInstance,
669 PolicyPrefIndicatorTest, 669 PolicyPrefIndicatorTest,
670 testing::ValuesIn(SplitPoliciesIntoChunks(50))); 670 testing::ValuesIn(SplitPoliciesIntoChunks(50)));
671 671
672 } // namespace policy 672 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/app/policy/syntax_check_policy_template_json.py ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698