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

Side by Side Diff: chrome/browser/usb/usb_browsertest.cc

Issue 2844923002: Replace InterfaceRegistry on RenderFrameHostImpl with BinderRegistry (Closed)
Patch Set: . Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <memory> 5 #include <memory>
6 #include <string> 6 #include <string>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/tabs/tab_strip_model.h" 11 #include "chrome/browser/ui/tabs/tab_strip_model.h"
12 #include "chrome/browser/usb/usb_chooser_controller.h" 12 #include "chrome/browser/usb/usb_chooser_controller.h"
13 #include "chrome/test/base/in_process_browser_test.h" 13 #include "chrome/test/base/in_process_browser_test.h"
14 #include "chrome/test/base/ui_test_utils.h" 14 #include "chrome/test/base/ui_test_utils.h"
15 #include "content/public/browser/render_frame_host.h" 15 #include "content/public/browser/render_frame_host.h"
16 #include "content/public/common/content_switches.h" 16 #include "content/public/common/content_switches.h"
17 #include "content/public/test/browser_test_utils.h" 17 #include "content/public/test/browser_test_utils.h"
18 #include "device/base/mock_device_client.h" 18 #include "device/base/mock_device_client.h"
19 #include "device/usb/mock_usb_device.h" 19 #include "device/usb/mock_usb_device.h"
20 #include "device/usb/mock_usb_service.h" 20 #include "device/usb/mock_usb_service.h"
21 #include "device/usb/public/interfaces/chooser_service.mojom.h" 21 #include "device/usb/public/interfaces/chooser_service.mojom.h"
22 #include "device/usb/webusb_descriptors.h" 22 #include "device/usb/webusb_descriptors.h"
23 #include "mojo/public/cpp/bindings/strong_binding.h" 23 #include "mojo/public/cpp/bindings/strong_binding.h"
24 #include "services/service_manager/public/cpp/interface_registry.h" 24 #include "services/service_manager/public/cpp/binder_registry.h"
25 25
26 using content::RenderFrameHost; 26 using content::RenderFrameHost;
27 using device::MockDeviceClient; 27 using device::MockDeviceClient;
28 using device::MockUsbDevice; 28 using device::MockUsbDevice;
29 29
30 namespace { 30 namespace {
31 31
32 class FakeChooserView : public ChooserController::View { 32 class FakeChooserView : public ChooserController::View {
33 public: 33 public:
34 explicit FakeChooserView(std::unique_ptr<ChooserController> controller) 34 explicit FakeChooserView(std::unique_ptr<ChooserController> controller)
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 embedded_frame, 192 embedded_frame,
193 "navigator.usb.getDevices()" 193 "navigator.usb.getDevices()"
194 " .then(devices => {" 194 " .then(devices => {"
195 " domAutomationController.send(devices.length.toString());" 195 " domAutomationController.send(devices.length.toString());"
196 " });", 196 " });",
197 &result)); 197 &result));
198 EXPECT_EQ("1", result); 198 EXPECT_EQ("1", result);
199 } 199 }
200 200
201 } // namespace 201 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/mojo_web_ui_controller.h ('k') | components/dom_distiller/content/browser/distillability_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698