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

Side by Side Diff: device/usb/mock_usb_device.cc

Issue 1326003006: Add webusb notification UI unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hardcoded expected string for testing Created 5 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/usb/mock_usb_device.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "device/usb/mock_usb_device.h" 5 #include "device/usb/mock_usb_device.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 8
9 namespace device { 9 namespace device {
10 10
11 MockUsbDevice::MockUsbDevice(uint16 vendor_id, uint16 product_id) 11 MockUsbDevice::MockUsbDevice(uint16 vendor_id, uint16 product_id)
12 : MockUsbDevice(vendor_id, product_id, "", "", "") { 12 : MockUsbDevice(vendor_id, product_id, "", "", "") {
13 } 13 }
14 14
15 MockUsbDevice::MockUsbDevice(uint16 vendor_id, 15 MockUsbDevice::MockUsbDevice(uint16 vendor_id,
16 uint16 product_id, 16 uint16 product_id,
17 const std::string& manufacturer_string, 17 const std::string& manufacturer_string,
18 const std::string& product_string, 18 const std::string& product_string,
19 const std::string& serial_number) 19 const std::string& serial_number)
20 : UsbDevice(vendor_id, 20 : UsbDevice(vendor_id,
21 product_id, 21 product_id,
22 base::UTF8ToUTF16(manufacturer_string), 22 base::UTF8ToUTF16(manufacturer_string),
23 base::UTF8ToUTF16(product_string), 23 base::UTF8ToUTF16(product_string),
24 base::UTF8ToUTF16(serial_number)) { 24 base::UTF8ToUTF16(serial_number)) {
25 } 25 }
26 26
27 MockUsbDevice::MockUsbDevice(uint16 vendor_id,
28 uint16 product_id,
29 const std::string& manufacturer_string,
30 const std::string& product_string,
31 const std::string& serial_number,
32 const GURL& webusb_landing_page)
33 : UsbDevice(vendor_id,
34 product_id,
35 base::UTF8ToUTF16(manufacturer_string),
36 base::UTF8ToUTF16(product_string),
37 base::UTF8ToUTF16(serial_number)) {
38 webusb_landing_page_ = webusb_landing_page;
39 }
40
27 MockUsbDevice::~MockUsbDevice() { 41 MockUsbDevice::~MockUsbDevice() {
28 } 42 }
29 43
30 } // namespace device 44 } // namespace device
OLDNEW
« no previous file with comments | « device/usb/mock_usb_device.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698