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

Side by Side Diff: chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc

Issue 2608513002: Remove mojo::String. (Closed)
Patch Set: Created 3 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 run_loop.RunUntilIdle(); 635 run_loop.RunUntilIdle();
636 ExpectResultBucketCount("TerminateRoute", 636 ExpectResultBucketCount("TerminateRoute",
637 RouteRequestResult::ResultCode::OK, 637 RouteRequestResult::ResultCode::OK,
638 1); 638 1);
639 } 639 }
640 640
641 TEST_F(MediaRouterMojoImplTest, TerminateRouteFails) { 641 TEST_F(MediaRouterMojoImplTest, TerminateRouteFails) {
642 base::RunLoop run_loop; 642 base::RunLoop run_loop;
643 EXPECT_CALL(mock_media_route_provider_, TerminateRoute(kRouteId, _)) 643 EXPECT_CALL(mock_media_route_provider_, TerminateRoute(kRouteId, _))
644 .WillOnce(Invoke([&run_loop]( 644 .WillOnce(Invoke([&run_loop](
645 const mojo::String& route_id, 645 const std::string& route_id,
646 const mojom::MediaRouteProvider::TerminateRouteCallback& cb) { 646 const mojom::MediaRouteProvider::TerminateRouteCallback& cb) {
647 cb.Run(std::string("timed out"), 647 cb.Run(std::string("timed out"),
648 mojom::RouteRequestResultCode::TIMED_OUT); 648 mojom::RouteRequestResultCode::TIMED_OUT);
649 })); 649 }));
650 router()->TerminateRoute(kRouteId); 650 router()->TerminateRoute(kRouteId);
651 run_loop.RunUntilIdle(); 651 run_loop.RunUntilIdle();
652 ExpectResultBucketCount("TerminateRoute", 652 ExpectResultBucketCount("TerminateRoute",
653 RouteRequestResult::ResultCode::OK, 653 RouteRequestResult::ResultCode::OK,
654 0); 654 0);
655 ExpectResultBucketCount("TerminateRoute", 655 ExpectResultBucketCount("TerminateRoute",
656 RouteRequestResult::ResultCode::TIMED_OUT, 656 RouteRequestResult::ResultCode::TIMED_OUT,
657 1); 657 1);
658 } 658 }
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 EXPECT_CALL(mock_media_route_provider_, 1560 EXPECT_CALL(mock_media_route_provider_,
1561 UpdateMediaSinks(MediaSourceForDesktop().id())) 1561 UpdateMediaSinks(MediaSourceForDesktop().id()))
1562 .WillOnce(InvokeWithoutArgs([&run_loop2]() { 1562 .WillOnce(InvokeWithoutArgs([&run_loop2]() {
1563 run_loop2.Quit(); 1563 run_loop2.Quit();
1564 })); 1564 }));
1565 1565
1566 run_loop2.Run(); 1566 run_loop2.Run();
1567 } 1567 }
1568 1568
1569 } // namespace media_router 1569 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698