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

Side by Side Diff: device/serial/serial_connection_unittest.cc

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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 | « device/serial/serial_connection_factory.h ('k') | device/serial/serial_device_enumerator.h » ('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 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
11 #include "device/serial/data_receiver.h" 11 #include "device/serial/data_receiver.h"
12 #include "device/serial/data_sender.h" 12 #include "device/serial/data_sender.h"
13 #include "device/serial/data_stream.mojom.h" 13 #include "device/serial/data_stream.mojom.h"
14 #include "device/serial/serial.mojom.h" 14 #include "device/serial/serial.mojom.h"
15 #include "device/serial/serial_connection.h" 15 #include "device/serial/serial_connection.h"
16 #include "device/serial/serial_service_impl.h" 16 #include "device/serial/serial_service_impl.h"
17 #include "device/serial/test_serial_io_handler.h" 17 #include "device/serial/test_serial_io_handler.h"
18 #include "mojo/public/cpp/bindings/interface_ptr.h"
19 #include "mojo/public/cpp/bindings/interface_request.h"
18 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
19 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h"
20 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
21 21
22 namespace device { 22 namespace device {
23 namespace { 23 namespace {
24 24
25 class FakeSerialDeviceEnumerator : public SerialDeviceEnumerator { 25 class FakeSerialDeviceEnumerator : public SerialDeviceEnumerator {
26 mojo::Array<serial::DeviceInfoPtr> GetDevices() override { 26 mojo::Array<serial::DeviceInfoPtr> GetDevices() override {
27 mojo::Array<serial::DeviceInfoPtr> devices(1); 27 mojo::Array<serial::DeviceInfoPtr> devices(1);
28 devices[0] = serial::DeviceInfo::New(); 28 devices[0] = serial::DeviceInfo::New();
29 devices[0]->path = "device"; 29 devices[0]->path = "device";
30 return devices.Pass(); 30 return devices.Pass();
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 WaitForEvent(EVENT_DATA_SENT); 325 WaitForEvent(EVENT_DATA_SENT);
326 EXPECT_EQ(serial::SEND_ERROR_NONE, send_error_); 326 EXPECT_EQ(serial::SEND_ERROR_NONE, send_error_);
327 EXPECT_EQ(4, bytes_sent_); 327 EXPECT_EQ(4, bytes_sent_);
328 ASSERT_NO_FATAL_FAILURE(Receive()); 328 ASSERT_NO_FATAL_FAILURE(Receive());
329 WaitForEvent(EVENT_DATA_RECEIVED); 329 WaitForEvent(EVENT_DATA_RECEIVED);
330 EXPECT_EQ("data", data_received_); 330 EXPECT_EQ("data", data_received_);
331 EXPECT_EQ(serial::RECEIVE_ERROR_NONE, receive_error_); 331 EXPECT_EQ(serial::RECEIVE_ERROR_NONE, receive_error_);
332 } 332 }
333 333
334 } // namespace device 334 } // namespace device
OLDNEW
« no previous file with comments | « device/serial/serial_connection_factory.h ('k') | device/serial/serial_device_enumerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698