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

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

Issue 2891583003: Revert of Disable two (unrelated) flaky tests on win (Closed)
Patch Set: Created 3 years, 7 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 | « chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc ('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 (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/base64url.h" 7 #include "base/base64url.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 CloudPolicyClient* client_ = nullptr; 235 CloudPolicyClient* client_ = nullptr;
236 }; 236 };
237 237
238 IN_PROC_BROWSER_TEST_F(ComponentCloudPolicyTest, FetchExtensionPolicy) { 238 IN_PROC_BROWSER_TEST_F(ComponentCloudPolicyTest, FetchExtensionPolicy) {
239 // Read the initial policy. 239 // Read the initial policy.
240 ExtensionTestMessageListener policy_listener(kTestPolicyJSON, false); 240 ExtensionTestMessageListener policy_listener(kTestPolicyJSON, false);
241 event_listener_->Reply("get-policy-Name"); 241 event_listener_->Reply("get-policy-Name");
242 EXPECT_TRUE(policy_listener.WaitUntilSatisfied()); 242 EXPECT_TRUE(policy_listener.WaitUntilSatisfied());
243 } 243 }
244 244
245 // http://crbug.com/723548 245 IN_PROC_BROWSER_TEST_F(ComponentCloudPolicyTest, UpdateExtensionPolicy) {
246 #if defined(OS_WIN)
247 #define MAYBE_UpdateExtensionPolicy DISABLED_UpdateExtensionPolicy
248 #else
249 #define MAYBE_UpdateExtensionPolicy UpdateExtensionPolicy
250 #endif
251 IN_PROC_BROWSER_TEST_F(ComponentCloudPolicyTest, MAYBE_UpdateExtensionPolicy) {
252 // Read the initial policy. 246 // Read the initial policy.
253 ExtensionTestMessageListener policy_listener(kTestPolicyJSON, true); 247 ExtensionTestMessageListener policy_listener(kTestPolicyJSON, true);
254 event_listener_->Reply("get-policy-Name"); 248 event_listener_->Reply("get-policy-Name");
255 EXPECT_TRUE(policy_listener.WaitUntilSatisfied()); 249 EXPECT_TRUE(policy_listener.WaitUntilSatisfied());
256 250
257 // Update the policy at the server and reload policy. 251 // Update the policy at the server and reload policy.
258 event_listener_.reset(new ExtensionTestMessageListener("event", true)); 252 event_listener_.reset(new ExtensionTestMessageListener("event", true));
259 policy_listener.Reply("idle"); 253 policy_listener.Reply("idle");
260 EXPECT_TRUE(test_server_.UpdatePolicyData( 254 EXPECT_TRUE(test_server_.UpdatePolicyData(
261 dm_protocol::kChromeExtensionPolicyType, kTestExtension, kTestPolicy2)); 255 dm_protocol::kChromeExtensionPolicyType, kTestExtension, kTestPolicy2));
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 ExtensionTestMessageListener policy_listener1("{}", true); 404 ExtensionTestMessageListener policy_listener1("{}", true);
411 event_listener_->Reply("get-policy-Name"); 405 event_listener_->Reply("get-policy-Name");
412 EXPECT_TRUE(policy_listener1.WaitUntilSatisfied()); 406 EXPECT_TRUE(policy_listener1.WaitUntilSatisfied());
413 407
414 ExtensionTestMessageListener policy_listener2(kTestPolicy2JSON, false); 408 ExtensionTestMessageListener policy_listener2(kTestPolicy2JSON, false);
415 policy_listener1.Reply("get-policy-Another"); 409 policy_listener1.Reply("get-policy-Another");
416 EXPECT_TRUE(policy_listener2.WaitUntilSatisfied()); 410 EXPECT_TRUE(policy_listener2.WaitUntilSatisfied());
417 } 411 }
418 412
419 } // namespace policy 413 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698