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

Side by Side Diff: chrome/browser/chromeos/printer_detector/printer_detector_unittest.cc

Issue 1265833005: Get all the UsbConfigDescriptor for the device configuration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use const auto Created 5 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/printer_detector/printer_detector.h" 5 #include "chrome/browser/chromeos/printer_detector/printer_detector.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // device::UsbDevice overrides: 66 // device::UsbDevice overrides:
67 void Open(const OpenCallback& callback) override { 67 void Open(const OpenCallback& callback) override {
68 ADD_FAILURE() << "Not reached"; 68 ADD_FAILURE() << "Not reached";
69 } 69 }
70 70
71 bool Close(scoped_refptr<device::UsbDeviceHandle> handle) override { 71 bool Close(scoped_refptr<device::UsbDeviceHandle> handle) override {
72 ADD_FAILURE() << "Not reached"; 72 ADD_FAILURE() << "Not reached";
73 return false; 73 return false;
74 } 74 }
75 75
76 const device::UsbConfigDescriptor* GetConfiguration() override { 76 const device::UsbConfigDescriptor* GetActiveConfiguration() override {
77 return config_.get(); 77 return config_.get();
78 } 78 }
79 79
80 scoped_ptr<device::UsbConfigDescriptor> config_; 80 scoped_ptr<device::UsbConfigDescriptor> config_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(FakeUsbDevice); 82 DISALLOW_COPY_AND_ASSIGN(FakeUsbDevice);
83 }; 83 };
84 84
85 class FakeDeviceClient : public device::DeviceClient { 85 class FakeDeviceClient : public device::DeviceClient {
86 public: 86 public:
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 .Set("interfaceClass", kPrinterInterfaceClass)))).Pass(); 361 .Set("interfaceClass", kPrinterInterfaceClass)))).Pass();
362 ASSERT_TRUE(extensions::ExtensionRegistry::Get(profile_.get()) 362 ASSERT_TRUE(extensions::ExtensionRegistry::Get(profile_.get())
363 ->AddEnabled(extension)); 363 ->AddEnabled(extension));
364 364
365 InvokeUsbAdded(123, 456, 1); 365 InvokeUsbAdded(123, 456, 1);
366 366
367 ASSERT_EQ(0u, notification_ui_manager_.GetNotificationCount()); 367 ASSERT_EQ(0u, notification_ui_manager_.GetNotificationCount());
368 } 368 }
369 369
370 } // namespace chromeos 370 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/devtools/device/usb/android_usb_browsertest.cc » ('j') | device/devices_app/usb/device_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698