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

Side by Side Diff: extensions/browser/api/serial/serial_apitest.cc

Issue 503873002: Remove implicit conversions from scoped_refptr to T* in extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « extensions/browser/api/hid/hid_api.cc ('k') | extensions/browser/api/usb/usb_api.cc » ('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 <string> 5 #include <string>
6 6
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "device/serial/test_serial_io_handler.h" 8 #include "device/serial/test_serial_io_handler.h"
9 #include "extensions/browser/api/serial/serial_api.h" 9 #include "extensions/browser/api/serial/serial_api.h"
10 #include "extensions/browser/api/serial/serial_connection.h" 10 #include "extensions/browser/api/serial/serial_connection.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 DISALLOW_COPY_AND_ASSIGN(FakeEchoSerialIoHandler); 64 DISALLOW_COPY_AND_ASSIGN(FakeEchoSerialIoHandler);
65 }; 65 };
66 66
67 class FakeSerialConnectFunction : public core_api::SerialConnectFunction { 67 class FakeSerialConnectFunction : public core_api::SerialConnectFunction {
68 protected: 68 protected:
69 virtual SerialConnection* CreateSerialConnection( 69 virtual SerialConnection* CreateSerialConnection(
70 const std::string& port, 70 const std::string& port,
71 const std::string& owner_extension_id) const OVERRIDE { 71 const std::string& owner_extension_id) const OVERRIDE {
72 scoped_refptr<FakeEchoSerialIoHandler> io_handler = 72 scoped_refptr<FakeEchoSerialIoHandler> io_handler =
73 new FakeEchoSerialIoHandler; 73 new FakeEchoSerialIoHandler;
74 EXPECT_CALL(*io_handler, SetControlSignals(_)).Times(1).WillOnce( 74 EXPECT_CALL(*io_handler.get(), SetControlSignals(_)).Times(1).WillOnce(
75 Return(true)); 75 Return(true));
76 SerialConnection* serial_connection = 76 SerialConnection* serial_connection =
77 new SerialConnection(port, owner_extension_id); 77 new SerialConnection(port, owner_extension_id);
78 serial_connection->SetIoHandlerForTest(io_handler); 78 serial_connection->SetIoHandlerForTest(io_handler);
79 return serial_connection; 79 return serial_connection;
80 } 80 }
81 81
82 protected: 82 protected:
83 virtual ~FakeSerialConnectFunction() {} 83 virtual ~FakeSerialConnectFunction() {}
84 }; 84 };
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 ASSERT_TRUE(RunExtensionTest("serial/api")) << message_; 127 ASSERT_TRUE(RunExtensionTest("serial/api")) << message_;
128 } 128 }
129 129
130 IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialRealHardware) { 130 IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialRealHardware) {
131 ResultCatcher catcher; 131 ResultCatcher catcher;
132 catcher.RestrictToProfile(browser()->profile()); 132 catcher.RestrictToProfile(browser()->profile());
133 133
134 ASSERT_TRUE(RunExtensionTest("serial/real_hardware")) << message_; 134 ASSERT_TRUE(RunExtensionTest("serial/real_hardware")) << message_;
135 } 135 }
OLDNEW
« no previous file with comments | « extensions/browser/api/hid/hid_api.cc ('k') | extensions/browser/api/usb/usb_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698