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

Side by Side Diff: chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc

Issue 16998003: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 236 }
237 237
238 IN_PROC_BROWSER_TEST_F(ComponentCloudPolicyTest, InstallNewExtension) { 238 IN_PROC_BROWSER_TEST_F(ComponentCloudPolicyTest, InstallNewExtension) {
239 EXPECT_TRUE(test_server_.UpdatePolicyData( 239 EXPECT_TRUE(test_server_.UpdatePolicyData(
240 dm_protocol::kChromeExtensionPolicyType, kTestExtension2, kTestPolicy2)); 240 dm_protocol::kChromeExtensionPolicyType, kTestExtension2, kTestPolicy2));
241 241
242 ExtensionTestMessageListener result_listener("ok", true); 242 ExtensionTestMessageListener result_listener("ok", true);
243 result_listener.AlsoListenForFailureMessage("fail"); 243 result_listener.AlsoListenForFailureMessage("fail");
244 scoped_refptr<const extensions::Extension> extension2 = 244 scoped_refptr<const extensions::Extension> extension2 =
245 LoadExtension(kTestExtension2Path); 245 LoadExtension(kTestExtension2Path);
246 ASSERT_TRUE(extension2); 246 ASSERT_TRUE(extension2.get());
247 ASSERT_EQ(kTestExtension2, extension2->id()); 247 ASSERT_EQ(kTestExtension2, extension2->id());
248 248
249 // This extension only sends the 'policy' signal once it receives the policy, 249 // This extension only sends the 'policy' signal once it receives the policy,
250 // and after verifying it has the expected value. Otherwise it sends 'fail'. 250 // and after verifying it has the expected value. Otherwise it sends 'fail'.
251 EXPECT_TRUE(result_listener.WaitUntilSatisfied()); 251 EXPECT_TRUE(result_listener.WaitUntilSatisfied());
252 } 252 }
253 253
254 #endif // OS_CHROMEOS 254 #endif // OS_CHROMEOS
255 255
256 } // namespace policy 256 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.cc ('k') | chrome/browser/ui/app_list/apps_model_builder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698