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

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

Issue 6002015: Policy: generate boilerplate policy type and constant code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweaks and right diff Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <gtest/gtest.h> 5 #include <gtest/gtest.h>
6 #include <windows.h> 6 #include <windows.h>
7 7
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 ASSERT_TRUE(value); 351 ASSERT_TRUE(value);
352 EXPECT_TRUE(value->Equals(GetParam().hklm_value())); 352 EXPECT_TRUE(value->Equals(GetParam().hklm_value()));
353 } 353 }
354 354
355 // Instantiate the test case for all supported policies. 355 // Instantiate the test case for all supported policies.
356 INSTANTIATE_TEST_CASE_P( 356 INSTANTIATE_TEST_CASE_P(
357 ConfigurationPolicyProviderWinTestInstance, 357 ConfigurationPolicyProviderWinTestInstance,
358 ConfigurationPolicyProviderWinTest, 358 ConfigurationPolicyProviderWinTest,
359 testing::Values( 359 testing::Values(
360 PolicyTestParams::ForStringPolicy( 360 PolicyTestParams::ForStringPolicy(
361 kPolicyHomePage, 361 kPolicyHomeageLocation,
362 key::kHomepageLocation), 362 key::kHomepageLocation),
363 PolicyTestParams::ForBooleanPolicy( 363 PolicyTestParams::ForBooleanPolicy(
364 kPolicyHomepageIsNewTabPage, 364 kPolicyHomepageIsNewTabPage,
365 key::kHomepageIsNewTabPage), 365 key::kHomepageIsNewTabPage),
366 PolicyTestParams::ForIntegerPolicy( 366 PolicyTestParams::ForIntegerPolicy(
367 kPolicyRestoreOnStartup, 367 kPolicyRestoreOnStartup,
368 key::kRestoreOnStartup), 368 key::kRestoreOnStartup),
369 PolicyTestParams::ForListPolicy( 369 PolicyTestParams::ForListPolicy(
370 kPolicyURLsToRestoreOnStartup, 370 kPolicyRestoreOnStartupURLs,
371 key::kURLsToRestoreOnStartup), 371 key::kRestoreOnStartupURLs),
372 PolicyTestParams::ForBooleanPolicy( 372 PolicyTestParams::ForBooleanPolicy(
373 kPolicyDefaultSearchProviderEnabled, 373 kPolicyDefaultSearchProviderEnabled,
374 key::kDefaultSearchProviderEnabled), 374 key::kDefaultSearchProviderEnabled),
375 PolicyTestParams::ForStringPolicy( 375 PolicyTestParams::ForStringPolicy(
376 kPolicyDefaultSearchProviderName, 376 kPolicyDefaultSearchProviderName,
377 key::kDefaultSearchProviderName), 377 key::kDefaultSearchProviderName),
378 PolicyTestParams::ForStringPolicy( 378 PolicyTestParams::ForStringPolicy(
379 kPolicyDefaultSearchProviderKeyword, 379 kPolicyDefaultSearchProviderKeyword,
380 key::kDefaultSearchProviderKeyword), 380 key::kDefaultSearchProviderKeyword),
381 PolicyTestParams::ForStringPolicy( 381 PolicyTestParams::ForStringPolicy(
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 PolicyTestParams::ForListPolicy( 426 PolicyTestParams::ForListPolicy(
427 kPolicyDisabledPlugins, 427 kPolicyDisabledPlugins,
428 key::kDisabledPlugins), 428 key::kDisabledPlugins),
429 PolicyTestParams::ForBooleanPolicy( 429 PolicyTestParams::ForBooleanPolicy(
430 kPolicyAutoFillEnabled, 430 kPolicyAutoFillEnabled,
431 key::kAutoFillEnabled), 431 key::kAutoFillEnabled),
432 PolicyTestParams::ForBooleanPolicy( 432 PolicyTestParams::ForBooleanPolicy(
433 kPolicySyncDisabled, 433 kPolicySyncDisabled,
434 key::kSyncDisabled), 434 key::kSyncDisabled),
435 PolicyTestParams::ForStringPolicy( 435 PolicyTestParams::ForStringPolicy(
436 kPolicyApplicationLocale, 436 kPolicyApplicationLocaleValue,
437 key::kApplicationLocaleValue), 437 key::kApplicationLocaleValue),
438 PolicyTestParams::ForListPolicy( 438 PolicyTestParams::ForListPolicy(
439 kPolicyExtensionInstallAllowList, 439 kPolicyExtensionInstallWhitelist,
440 key::kExtensionInstallAllowList), 440 key::kExtensionInstallWhitelist),
441 PolicyTestParams::ForListPolicy( 441 PolicyTestParams::ForListPolicy(
442 kPolicyExtensionInstallDenyList, 442 kPolicyExtensionInstallBlacklist,
443 key::kExtensionInstallDenyList), 443 key::kExtensionInstallBlacklist),
444 PolicyTestParams::ForBooleanPolicy( 444 PolicyTestParams::ForBooleanPolicy(
445 kPolicyShowHomeButton, 445 kPolicyShowHomeButton,
446 key::kShowHomeButton), 446 key::kShowHomeButton),
447 PolicyTestParams::ForBooleanPolicy( 447 PolicyTestParams::ForBooleanPolicy(
448 kPolicyPrintingEnabled, 448 kPolicyPrintingEnabled,
449 key::kPrintingEnabled))); 449 key::kPrintingEnabled)));
450 450
451 } // namespace policy 451 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698