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

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

Issue 562563002: Make some fields non-nullable in serial.mojom and data_stream.mojom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « device/serial/serial.mojom ('k') | extensions/renderer/resources/serial_service.js » ('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 "device/serial/serial_device_enumerator.h" 5 #include "device/serial/serial_device_enumerator.h"
6 #include "device/serial/serial_service_impl.h" 6 #include "device/serial/serial_service_impl.h"
7 #include "device/serial/test_serial_io_handler.h" 7 #include "device/serial/test_serial_io_handler.h"
8 #include "extensions/renderer/api_test_base.h" 8 #include "extensions/renderer/api_test_base.h"
9 #include "grit/extensions_renderer_resources.h" 9 #include "grit/extensions_renderer_resources.h"
10 10
(...skipping 15 matching lines...) Expand all
26 result[0]->has_vendor_id = true; 26 result[0]->has_vendor_id = true;
27 result[0]->product_id = 5678; 27 result[0]->product_id = 5678;
28 result[0]->has_product_id = true; 28 result[0]->has_product_id = true;
29 result[0]->display_name = "foo"; 29 result[0]->display_name = "foo";
30 result[1] = device::serial::DeviceInfo::New(); 30 result[1] = device::serial::DeviceInfo::New();
31 result[1]->path = "another_device"; 31 result[1]->path = "another_device";
32 // These IDs should be ignored. 32 // These IDs should be ignored.
33 result[1]->vendor_id = 1234; 33 result[1]->vendor_id = 1234;
34 result[1]->product_id = 5678; 34 result[1]->product_id = 5678;
35 result[2] = device::serial::DeviceInfo::New(); 35 result[2] = device::serial::DeviceInfo::New();
36 result[2]->path = "";
36 result[2]->display_name = ""; 37 result[2]->display_name = "";
37 return result.Pass(); 38 return result.Pass();
38 } 39 }
39 }; 40 };
40 41
41 enum OptionalValue { 42 enum OptionalValue {
42 OPTIONAL_VALUE_UNSET, 43 OPTIONAL_VALUE_UNSET,
43 OPTIONAL_VALUE_FALSE, 44 OPTIONAL_VALUE_FALSE,
44 OPTIONAL_VALUE_TRUE, 45 OPTIONAL_VALUE_TRUE,
45 }; 46 };
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 614
614 TEST_F(SerialApiTest, SetPausedUnknownConnectionId) { 615 TEST_F(SerialApiTest, SetPausedUnknownConnectionId) {
615 RunTest("serial_unittest.js", "testSetPausedUnknownConnectionId"); 616 RunTest("serial_unittest.js", "testSetPausedUnknownConnectionId");
616 } 617 }
617 618
618 TEST_F(SerialApiTest, SendUnknownConnectionId) { 619 TEST_F(SerialApiTest, SendUnknownConnectionId) {
619 RunTest("serial_unittest.js", "testSendUnknownConnectionId"); 620 RunTest("serial_unittest.js", "testSendUnknownConnectionId");
620 } 621 }
621 622
622 } // namespace extensions 623 } // namespace extensions
OLDNEW
« no previous file with comments | « device/serial/serial.mojom ('k') | extensions/renderer/resources/serial_service.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698