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

Side by Side Diff: extensions/browser/api/bluetooth/bluetooth_private_apitest.cc

Issue 819193002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "device/bluetooth/test/mock_bluetooth_adapter.h" 9 #include "device/bluetooth/test/mock_bluetooth_adapter.h"
10 #include "device/bluetooth/test/mock_bluetooth_device.h" 10 #include "device/bluetooth/test/mock_bluetooth_device.h"
(...skipping 29 matching lines...) Expand all
40 class BluetoothPrivateApiTest : public ExtensionApiTest { 40 class BluetoothPrivateApiTest : public ExtensionApiTest {
41 public: 41 public:
42 BluetoothPrivateApiTest() 42 BluetoothPrivateApiTest()
43 : adapter_name_(kAdapterName), 43 : adapter_name_(kAdapterName),
44 adapter_powered_(false), 44 adapter_powered_(false),
45 adapter_discoverable_(false) {} 45 adapter_discoverable_(false) {}
46 46
47 ~BluetoothPrivateApiTest() override {} 47 ~BluetoothPrivateApiTest() override {}
48 48
49 void SetUpOnMainThread() override { 49 void SetUpOnMainThread() override {
50 CommandLine::ForCurrentProcess()->AppendSwitchASCII( 50 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
51 switches::kWhitelistedExtensionID, kTestExtensionId); 51 switches::kWhitelistedExtensionID, kTestExtensionId);
52 mock_adapter_ = new NiceMock<MockBluetoothAdapter>(); 52 mock_adapter_ = new NiceMock<MockBluetoothAdapter>();
53 event_router()->SetAdapterForTest(mock_adapter_.get()); 53 event_router()->SetAdapterForTest(mock_adapter_.get());
54 mock_device_.reset(new NiceMock<MockBluetoothDevice>(mock_adapter_.get(), 54 mock_device_.reset(new NiceMock<MockBluetoothDevice>(mock_adapter_.get(),
55 0, 55 0,
56 kDeviceName, 56 kDeviceName,
57 "11:12:13:14:15:16", 57 "11:12:13:14:15:16",
58 false, 58 false,
59 false)); 59 false));
60 ON_CALL(*mock_adapter_.get(), GetDevice(mock_device_->GetAddress())) 60 ON_CALL(*mock_adapter_.get(), GetDevice(mock_device_->GetAddress()))
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 _, device::BluetoothAdapter::PAIRING_DELEGATE_PRIORITY_HIGH)) 177 _, device::BluetoothAdapter::PAIRING_DELEGATE_PRIORITY_HIGH))
178 .WillOnce(WithoutArgs( 178 .WillOnce(WithoutArgs(
179 Invoke(this, &BluetoothPrivateApiTest::DispatchPasskeyPairingEvent))); 179 Invoke(this, &BluetoothPrivateApiTest::DispatchPasskeyPairingEvent)));
180 EXPECT_CALL(*mock_device_, ExpectingPasskey()).WillRepeatedly(Return(true)); 180 EXPECT_CALL(*mock_device_, ExpectingPasskey()).WillRepeatedly(Return(true));
181 EXPECT_CALL(*mock_device_, SetPasskey(900531)); 181 EXPECT_CALL(*mock_device_, SetPasskey(900531));
182 ASSERT_TRUE(RunComponentExtensionTest("bluetooth_private/passkey_pairing")) 182 ASSERT_TRUE(RunComponentExtensionTest("bluetooth_private/passkey_pairing"))
183 << message_; 183 << message_;
184 } 184 }
185 185
186 } // namespace extensions 186 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/app_window/app_window_api.cc ('k') | extensions/browser/api/cast_channel/cast_channel_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698