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

Side by Side Diff: extensions/renderer/api/serial/serial_api_unittest.cc

Issue 1849303002: Disable some extensions_unittests on LSAN builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ok - let's push it out to CQ... Created 4 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 481
482 TEST_F(SerialApiTest, GetInfoFailToGetPortInfo) { 482 TEST_F(SerialApiTest, GetInfoFailToGetPortInfo) {
483 io_handler_ = new FailToGetInfoTestIoHandler(1); 483 io_handler_ = new FailToGetInfoTestIoHandler(1);
484 RunTest("serial_unittest.js", "testGetInfoFailToGetPortInfo"); 484 RunTest("serial_unittest.js", "testGetInfoFailToGetPortInfo");
485 } 485 }
486 486
487 TEST_F(SerialApiTest, GetConnections) { 487 TEST_F(SerialApiTest, GetConnections) {
488 RunTest("serial_unittest.js", "testGetConnections"); 488 RunTest("serial_unittest.js", "testGetConnections");
489 } 489 }
490 490
491 TEST_F(SerialApiTest, GetControlSignals) { 491 // https://crbug.com/599898
492 #if defined(LEAK_SANITIZER)
493 #define MAYBE_GetControlSignals DISABLED_GetControlSignals
494 #else
495 #define MAYBE_GetControlSignals GetControlSignals
496 #endif
497 TEST_F(SerialApiTest, MAYBE_GetControlSignals) {
492 io_handler_ = new GetControlSignalsTestIoHandler; 498 io_handler_ = new GetControlSignalsTestIoHandler;
493 RunTest("serial_unittest.js", "testGetControlSignals"); 499 RunTest("serial_unittest.js", "testGetControlSignals");
494 EXPECT_EQ(16u, io_handler_->num_calls()); 500 EXPECT_EQ(16u, io_handler_->num_calls());
495 } 501 }
496 502
497 TEST_F(SerialApiTest, SetControlSignals) { 503 TEST_F(SerialApiTest, SetControlSignals) {
498 io_handler_ = new SetControlSignalsTestIoHandler; 504 io_handler_ = new SetControlSignalsTestIoHandler;
499 RunTest("serial_unittest.js", "testSetControlSignals"); 505 RunTest("serial_unittest.js", "testSetControlSignals");
500 EXPECT_EQ(9u, io_handler_->num_calls()); 506 EXPECT_EQ(9u, io_handler_->num_calls());
501 } 507 }
502 508
503 TEST_F(SerialApiTest, Update) { 509 // https://crbug.com/599898
510 #if defined(LEAK_SANITIZER)
511 #define MAYBE_Update DISABLED_Update
512 #else
513 #define MAYBE_Update Update
514 #endif
515 TEST_F(SerialApiTest, MAYBE_Update) {
504 io_handler_ = new ConfigurePortTestIoHandler; 516 io_handler_ = new ConfigurePortTestIoHandler;
505 RunTest("serial_unittest.js", "testUpdate"); 517 RunTest("serial_unittest.js", "testUpdate");
506 EXPECT_EQ(11u, io_handler_->num_calls()); 518 EXPECT_EQ(11u, io_handler_->num_calls());
507 } 519 }
508 520
509 TEST_F(SerialApiTest, UpdateAcrossSerialization) { 521 // https://crbug.com/599898
522 #if defined(LEAK_SANITIZER)
523 #define MAYBE_UpdateAcrossSerialization DISABLED_UpdateAcrossSerialization
524 #else
525 #define MAYBE_UpdateAcrossSerialization UpdateAcrossSerialization
526 #endif
527 TEST_F(SerialApiTest, MAYBE_UpdateAcrossSerialization) {
510 io_handler_ = new ConfigurePortTestIoHandler; 528 io_handler_ = new ConfigurePortTestIoHandler;
511 RunTest("serial_unittest.js", "testUpdateAcrossSerialization"); 529 RunTest("serial_unittest.js", "testUpdateAcrossSerialization");
512 EXPECT_EQ(11u, io_handler_->num_calls()); 530 EXPECT_EQ(11u, io_handler_->num_calls());
513 } 531 }
514 532
515 TEST_F(SerialApiTest, UpdateInvalidBitrate) { 533 TEST_F(SerialApiTest, UpdateInvalidBitrate) {
516 io_handler_ = new ConfigurePortTestIoHandler; 534 io_handler_ = new ConfigurePortTestIoHandler;
517 RunTest("serial_unittest.js", "testUpdateInvalidBitrate"); 535 RunTest("serial_unittest.js", "testUpdateInvalidBitrate");
518 EXPECT_EQ(1u, io_handler_->num_calls()); 536 EXPECT_EQ(1u, io_handler_->num_calls());
519 } 537 }
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 io_handler_ = 712 io_handler_ =
695 new ReceiveErrorTestIoHandler(device::serial::ReceiveError::DEVICE_LOST); 713 new ReceiveErrorTestIoHandler(device::serial::ReceiveError::DEVICE_LOST);
696 ASSERT_NO_FATAL_FAILURE( 714 ASSERT_NO_FATAL_FAILURE(
697 RunTest("serial_unittest.js", "testRestoreAndReceiveErrorSetUp")); 715 RunTest("serial_unittest.js", "testRestoreAndReceiveErrorSetUp"));
698 scoped_ptr<ModuleSystemTestEnvironment> new_env(CreateEnvironment()); 716 scoped_ptr<ModuleSystemTestEnvironment> new_env(CreateEnvironment());
699 ApiTestEnvironment new_api_test_env(new_env.get()); 717 ApiTestEnvironment new_api_test_env(new_env.get());
700 PrepareEnvironment(&new_api_test_env, stash_backend_.get()); 718 PrepareEnvironment(&new_api_test_env, stash_backend_.get());
701 new_api_test_env.RunTest("serial_unittest.js", "testRestoreAndReceiveError"); 719 new_api_test_env.RunTest("serial_unittest.js", "testRestoreAndReceiveError");
702 } 720 }
703 721
704 TEST_F(SerialApiTest, StashAndRestoreNoConnections) { 722 // https://crbug.com/599898
723 #if defined(LEAK_SANITIZER)
724 #define MAYBE_StashAndRestoreNoConnections DISABLED_StashAndRestoreNoConnections
725 #else
726 #define MAYBE_StashAndRestoreNoConnections StashAndRestoreNoConnections
727 #endif
728 TEST_F(SerialApiTest, MAYBE_StashAndRestoreNoConnections) {
705 ASSERT_NO_FATAL_FAILURE( 729 ASSERT_NO_FATAL_FAILURE(
706 RunTest("serial_unittest.js", "testStashNoConnections")); 730 RunTest("serial_unittest.js", "testStashNoConnections"));
707 io_handler_ = nullptr; 731 io_handler_ = nullptr;
708 scoped_ptr<ModuleSystemTestEnvironment> new_env(CreateEnvironment()); 732 scoped_ptr<ModuleSystemTestEnvironment> new_env(CreateEnvironment());
709 ApiTestEnvironment new_api_test_env(new_env.get()); 733 ApiTestEnvironment new_api_test_env(new_env.get());
710 PrepareEnvironment(&new_api_test_env, stash_backend_.get()); 734 PrepareEnvironment(&new_api_test_env, stash_backend_.get());
711 new_api_test_env.RunTest("serial_unittest.js", "testRestoreNoConnections"); 735 new_api_test_env.RunTest("serial_unittest.js", "testRestoreNoConnections");
712 } 736 }
713 737
714 } // namespace extensions 738 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/api/serial/data_sender_unittest.cc ('k') | extensions/renderer/mojo/stash_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698