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

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

Issue 190663012: Run ContentMain in a browser_test's browser process. This removes duplication of code in the browse… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: try to fix android by restoring old path just for it Created 6 years, 9 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 <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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 } 423 }
424 if (!controlled_by.empty()) { 424 if (!controlled_by.empty()) {
425 EXPECT_TRUE(have_visible_indicators) 425 EXPECT_TRUE(have_visible_indicators)
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 typedef InProcessBrowserTest PolicyPrefsTestCoverageTest;
434
435 IN_PROC_BROWSER_TEST_F(PolicyPrefsTestCoverageTest, AllPoliciesHaveATestCase) {
434 // Verifies that all known policies have a test case in the JSON file. 436 // Verifies that all known policies have a test case in the JSON file.
435 // This test fails when a policy is added to 437 // This test fails when a policy is added to
436 // components/policy/resources/policy_templates.json but a test case is not 438 // components/policy/resources/policy_templates.json but a test case is not
437 // added to chrome/test/data/policy/policy_test_cases.json. 439 // added to chrome/test/data/policy/policy_test_cases.json.
438 Schema chrome_schema = Schema::Wrap(GetChromeSchemaData()); 440 Schema chrome_schema = Schema::Wrap(GetChromeSchemaData());
439 ASSERT_TRUE(chrome_schema.valid()); 441 ASSERT_TRUE(chrome_schema.valid());
440 442
441 PolicyTestCases policy_test_cases; 443 PolicyTestCases policy_test_cases;
442 for (Schema::Iterator it = chrome_schema.GetPropertiesIterator(); 444 for (Schema::Iterator it = chrome_schema.GetPropertiesIterator();
443 !it.IsAtEnd(); it.Advance()) { 445 !it.IsAtEnd(); it.Advance()) {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 } 670 }
669 } 671 }
670 } 672 }
671 } 673 }
672 674
673 INSTANTIATE_TEST_CASE_P(PolicyPrefIndicatorTestInstance, 675 INSTANTIATE_TEST_CASE_P(PolicyPrefIndicatorTestInstance,
674 PolicyPrefIndicatorTest, 676 PolicyPrefIndicatorTest,
675 testing::ValuesIn(SplitPoliciesIntoChunks(10))); 677 testing::ValuesIn(SplitPoliciesIntoChunks(10)));
676 678
677 } // namespace policy 679 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698