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

Side by Side Diff: components/policy/core/common/configuration_policy_provider_test.cc

Issue 2353103002: Use FileDescriptorWatcher in FilePathWatcherKQueue. (Closed)
Patch Set: fix windows build error Created 4 years, 2 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
« no previous file with comments | « components/policy/core/common/configuration_policy_provider_test.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/policy/core/common/configuration_policy_provider_test.h" 5 #include "components/policy/core/common/configuration_policy_provider_test.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // available for use in other tests. Subclasses of PolicyProviderTestHarness 126 // available for use in other tests. Subclasses of PolicyProviderTestHarness
127 // may use different values. 127 // may use different values.
128 const char kKeyString[] = "StringPolicy"; 128 const char kKeyString[] = "StringPolicy";
129 const char kKeyBoolean[] = "BooleanPolicy"; 129 const char kKeyBoolean[] = "BooleanPolicy";
130 const char kKeyInteger[] = "IntegerPolicy"; 130 const char kKeyInteger[] = "IntegerPolicy";
131 const char kKeyStringList[] = "StringListPolicy"; 131 const char kKeyStringList[] = "StringListPolicy";
132 const char kKeyDictionary[] = "DictionaryPolicy"; 132 const char kKeyDictionary[] = "DictionaryPolicy";
133 133
134 } // namespace test_keys 134 } // namespace test_keys
135 135
136 PolicyTestBase::PolicyTestBase() {} 136 PolicyTestBase::PolicyTestBase()
137 #if defined(OS_POSIX)
138 : file_descriptor_watcher_(&loop_)
139 #endif
140 {
141 }
137 142
138 PolicyTestBase::~PolicyTestBase() {} 143 PolicyTestBase::~PolicyTestBase() {}
139 144
140 void PolicyTestBase::SetUp() { 145 void PolicyTestBase::SetUp() {
141 const PolicyNamespace ns(POLICY_DOMAIN_CHROME, ""); 146 const PolicyNamespace ns(POLICY_DOMAIN_CHROME, "");
142 ASSERT_TRUE(RegisterSchema(ns, kTestChromeSchema)); 147 ASSERT_TRUE(RegisterSchema(ns, kTestChromeSchema));
143 } 148 }
144 149
145 void PolicyTestBase::TearDown() { 150 void PolicyTestBase::TearDown() {
146 base::RunLoop().RunUntilIdle(); 151 base::RunLoop().RunUntilIdle();
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, 424 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS,
420 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")) 425 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
421 .CopyFrom(expected_policy); 426 .CopyFrom(expected_policy);
422 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, 427 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS,
423 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")) 428 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"))
424 .CopyFrom(expected_policy); 429 .CopyFrom(expected_policy);
425 EXPECT_TRUE(provider_->policies().Equals(expected_bundle)); 430 EXPECT_TRUE(provider_->policies().Equals(expected_bundle));
426 } 431 }
427 432
428 } // namespace policy 433 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/configuration_policy_provider_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698