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

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

Issue 1676913002: [mojo] Delete third_party/mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: let's try that again Created 4 years, 10 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
« no previous file with comments | « extensions/renderer/DEPS ('k') | extensions/renderer/api_test_base.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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <queue> 7 #include <queue>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "device/serial/data_source_sender.h" 11 #include "device/serial/data_source_sender.h"
12 #include "device/serial/data_stream.mojom.h" 12 #include "device/serial/data_stream.mojom.h"
13 #include "extensions/renderer/api_test_base.h" 13 #include "extensions/renderer/api_test_base.h"
14 #include "gin/dictionary.h" 14 #include "gin/dictionary.h"
15 #include "gin/wrappable.h" 15 #include "gin/wrappable.h"
16 #include "grit/extensions_renderer_resources.h" 16 #include "grit/extensions_renderer_resources.h"
17 #include "mojo/edk/js/handle.h"
17 18
18 namespace extensions { 19 namespace extensions {
19 20
20 class DataReceiverFactory : public gin::Wrappable<DataReceiverFactory> { 21 class DataReceiverFactory : public gin::Wrappable<DataReceiverFactory> {
21 public: 22 public:
22 using Callback = base::Callback<void( 23 using Callback = base::Callback<void(
23 mojo::InterfaceRequest<device::serial::DataSource>, 24 mojo::InterfaceRequest<device::serial::DataSource>,
24 mojo::InterfacePtr<device::serial::DataSourceClient>)>; 25 mojo::InterfacePtr<device::serial::DataSourceClient>)>;
25 static gin::Handle<DataReceiverFactory> Create(v8::Isolate* isolate, 26 static gin::Handle<DataReceiverFactory> Create(v8::Isolate* isolate,
26 const Callback& callback) { 27 const Callback& callback) {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 data_to_send_.push("a"); 175 data_to_send_.push("a");
175 RunTest("data_receiver_unittest.js", "testSerializeDuringReceive"); 176 RunTest("data_receiver_unittest.js", "testSerializeDuringReceive");
176 } 177 }
177 178
178 TEST_F(DataReceiverTest, SerializeAfterClose) { 179 TEST_F(DataReceiverTest, SerializeAfterClose) {
179 data_to_send_.push("a"); 180 data_to_send_.push("a");
180 RunTest("data_receiver_unittest.js", "testSerializeAfterClose"); 181 RunTest("data_receiver_unittest.js", "testSerializeAfterClose");
181 } 182 }
182 183
183 } // namespace extensions 184 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/DEPS ('k') | extensions/renderer/api_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698