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

Side by Side Diff: content/browser/presentation/presentation_service_impl_unittest.cc

Issue 2574673002: Removes ScopedVector from presentation_service_impl. (Closed)
Patch Set: Fixes test. Created 4 years 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 "content/browser/presentation/presentation_service_impl.h" 5 #include "content/browser/presentation/presentation_service_impl.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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 PresentationConnectionMessageCallback message_cb; 344 PresentationConnectionMessageCallback message_cb;
345 { 345 {
346 base::RunLoop run_loop; 346 base::RunLoop run_loop;
347 EXPECT_CALL(mock_delegate_, ListenForConnectionMessages(_, _, _, _)) 347 EXPECT_CALL(mock_delegate_, ListenForConnectionMessages(_, _, _, _))
348 .WillOnce(DoAll(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit), 348 .WillOnce(DoAll(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit),
349 SaveArg<3>(&message_cb))); 349 SaveArg<3>(&message_cb)));
350 service_ptr_->ListenForConnectionMessages(std::move(session)); 350 service_ptr_->ListenForConnectionMessages(std::move(session));
351 run_loop.Run(); 351 run_loop.Run();
352 } 352 }
353 353
354 ScopedVector<PresentationConnectionMessage> messages; 354 std::vector<std::unique_ptr<PresentationConnectionMessage>> messages;
355 std::unique_ptr<content::PresentationConnectionMessage> message; 355 std::unique_ptr<content::PresentationConnectionMessage> message;
356 message.reset(new content::PresentationConnectionMessage( 356 message.reset(new content::PresentationConnectionMessage(
357 PresentationMessageType::TEXT)); 357 PresentationMessageType::TEXT));
358 message->message = text_msg; 358 message->message = text_msg;
359 messages.push_back(std::move(message)); 359 messages.push_back(std::move(message));
360 message.reset(new content::PresentationConnectionMessage( 360 message.reset(new content::PresentationConnectionMessage(
361 PresentationMessageType::BINARY)); 361 PresentationMessageType::BINARY));
362 message->data.reset(new std::vector<uint8_t>(binary_data)); 362 message->data.reset(new std::vector<uint8_t>(binary_data));
363 messages.push_back(std::move(message)); 363 messages.push_back(std::move(message));
364 364
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 mock_delegate_.set_screen_availability_listening_supported(false); 866 mock_delegate_.set_screen_availability_listening_supported(false);
867 base::RunLoop run_loop; 867 base::RunLoop run_loop;
868 EXPECT_CALL(mock_client_, 868 EXPECT_CALL(mock_client_,
869 OnScreenAvailabilityNotSupported(presentation_url1_)) 869 OnScreenAvailabilityNotSupported(presentation_url1_))
870 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); 870 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit));
871 ListenForScreenAvailabilityAndWait(presentation_url1_, false); 871 ListenForScreenAvailabilityAndWait(presentation_url1_, false);
872 run_loop.Run(); 872 run_loop.Run();
873 } 873 }
874 874
875 } // namespace content 875 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/presentation/presentation_service_impl.cc ('k') | content/public/browser/presentation_service_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698