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

Side by Side Diff: chrome/browser/extensions/api/messaging/native_message_process_host_unittest.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 | « no previous file | chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc » ('j') | 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) 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 "chrome/browser/extensions/api/messaging/native_message_process_host.h" 5 #include "chrome/browser/extensions/api/messaging/native_message_process_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 run_loop_.reset(new base::RunLoop()); 296 run_loop_.reset(new base::RunLoop());
297 run_loop_->Run(); 297 run_loop_->Run();
298 EXPECT_TRUE(last_message_parsed_->GetInteger("id", &id)); 298 EXPECT_TRUE(last_message_parsed_->GetInteger("id", &id));
299 EXPECT_EQ(2, id); 299 EXPECT_EQ(2, id);
300 EXPECT_TRUE(last_message_parsed_->GetString("echo.foo", &text)); 300 EXPECT_TRUE(last_message_parsed_->GetString("echo.foo", &text));
301 EXPECT_EQ("bar", text); 301 EXPECT_EQ("bar", text);
302 EXPECT_TRUE(last_message_parsed_->GetString("caller_url", &url)); 302 EXPECT_TRUE(last_message_parsed_->GetString("caller_url", &url));
303 EXPECT_EQ(expected_url, url); 303 EXPECT_EQ(expected_url, url);
304 } 304 }
305 305
306 // http://crbug.com/723291 306 TEST_F(NativeMessagingTest, UserLevel) {
307 #if defined(OS_WIN)
308 #define MAYBE_UserLevel DISABLED_UserLevel
309 #else
310 #define MAYBE_UserLevel UserLevel
311 #endif
312 TEST_F(NativeMessagingTest, MAYBE_UserLevel) {
313 ScopedTestNativeMessagingHost test_host; 307 ScopedTestNativeMessagingHost test_host;
314 ASSERT_NO_FATAL_FAILURE(test_host.RegisterTestHost(true)); 308 ASSERT_NO_FATAL_FAILURE(test_host.RegisterTestHost(true));
315 309
316 std::string error_message; 310 std::string error_message;
317 native_message_host_ = NativeMessageProcessHost::Create( 311 native_message_host_ = NativeMessageProcessHost::Create(
318 NULL, 312 NULL,
319 ScopedTestNativeMessagingHost::kExtensionId, 313 ScopedTestNativeMessagingHost::kExtensionId,
320 ScopedTestNativeMessagingHost::kHostName, 314 ScopedTestNativeMessagingHost::kHostName,
321 true, 315 true,
322 &error_message); 316 &error_message);
(...skipping 21 matching lines...) Expand all
344 native_message_host_->Start(this); 338 native_message_host_->Start(this);
345 ASSERT_TRUE(native_message_host_.get()); 339 ASSERT_TRUE(native_message_host_.get());
346 run_loop_.reset(new base::RunLoop()); 340 run_loop_.reset(new base::RunLoop());
347 run_loop_->Run(); 341 run_loop_->Run();
348 342
349 // The host should fail to start. 343 // The host should fail to start.
350 ASSERT_TRUE(channel_closed_); 344 ASSERT_TRUE(channel_closed_);
351 } 345 }
352 346
353 } // namespace extensions 347 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698