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

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

Issue 10500016: Move test_browser_thread.h from content\test to content\public\test. This way we can enforce that i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "chrome/browser/policy/cloud_policy_data_store.h" 12 #include "chrome/browser/policy/cloud_policy_data_store.h"
13 #include "chrome/browser/policy/cros_user_policy_cache.h" 13 #include "chrome/browser/policy/cros_user_policy_cache.h"
14 #include "chrome/browser/policy/proto/cloud_policy.pb.h" 14 #include "chrome/browser/policy/proto/cloud_policy.pb.h"
15 #include "chrome/browser/policy/proto/device_management_backend.pb.h" 15 #include "chrome/browser/policy/proto/device_management_backend.pb.h"
16 #include "chrome/browser/policy/proto/device_management_local.pb.h" 16 #include "chrome/browser/policy/proto/device_management_local.pb.h"
17 #include "chromeos/dbus/mock_session_manager_client.h" 17 #include "chromeos/dbus/mock_session_manager_client.h"
18 #include "content/test/test_browser_thread.h" 18 #include "content/public/test/test_browser_thread.h"
19 #include "policy/policy_constants.h" 19 #include "policy/policy_constants.h"
20 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 22
23 using testing::InvokeArgument; 23 using testing::InvokeArgument;
24 using testing::_; 24 using testing::_;
25 25
26 namespace em = enterprise_management; 26 namespace em = enterprise_management;
27 27
28 // These should probably be moved to a more central place. 28 // These should probably be moved to a more central place.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 EXPECT_EQ(kFakeDeviceId, data_store_->device_id()); 181 EXPECT_EQ(kFakeDeviceId, data_store_->device_id());
182 EXPECT_EQ(kFakeToken, data_store_->device_token()); 182 EXPECT_EQ(kFakeToken, data_store_->device_token());
183 EXPECT_EQ(1U, cache.policy()->size()); 183 EXPECT_EQ(1U, cache.policy()->size());
184 const PolicyMap::Entry* entry = cache.policy()->Get(key::kShowHomeButton); 184 const PolicyMap::Entry* entry = cache.policy()->Get(key::kShowHomeButton);
185 ASSERT_TRUE(entry); 185 ASSERT_TRUE(entry);
186 EXPECT_TRUE(base::FundamentalValue(true).Equals(entry->value)); 186 EXPECT_TRUE(base::FundamentalValue(true).Equals(entry->value));
187 }; 187 };
188 188
189 } // namespace 189 } // namespace
190 } // namespace policy 190 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698