OLD | NEW |
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 // Unit test for VideoCaptureController. | 5 // Unit test for VideoCaptureController. |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 | 647 |
648 const VideoCaptureControllerID route(0x99); | 648 const VideoCaptureControllerID route(0x99); |
649 | 649 |
650 // Start with one client. | 650 // Start with one client. |
651 controller_->AddClient(route, | 651 controller_->AddClient(route, |
652 client_a_.get(), | 652 client_a_.get(), |
653 base::kNullProcessHandle, | 653 base::kNullProcessHandle, |
654 100, | 654 100, |
655 params); | 655 params); |
656 ASSERT_EQ(1, controller_->GetClientCount()); | 656 ASSERT_EQ(1, controller_->GetClientCount()); |
657 device_->OnIncomingCapturedData(data, | 657 device_->OnIncomingCapturedData( |
658 0 /* length */, | 658 data, |
659 params.requested_format, | 659 params.requested_format.ImageAllocationSize(), |
660 0 /* rotation */, | 660 params.requested_format, |
661 base::TimeTicks()); | 661 0 /* rotation */, |
| 662 base::TimeTicks()); |
662 EXPECT_EQ(100, controller_->RemoveClient(route, client_a_.get())); | 663 EXPECT_EQ(100, controller_->RemoveClient(route, client_a_.get())); |
663 Mock::VerifyAndClearExpectations(client_a_.get()); | 664 Mock::VerifyAndClearExpectations(client_a_.get()); |
664 } | 665 } |
665 } | 666 } |
666 | 667 |
667 } // namespace content | 668 } // namespace content |
OLD | NEW |