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

Side by Side Diff: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc

Issue 366813007: Removed InProcessBrowserTest::CleanUpOnMainThread() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed superfluous override. Created 6 years, 5 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 | Annotate | Revision Log
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/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energ y_api.h" 6 #include "chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energ y_api.h"
7 #include "chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energ y_event_router.h" 7 #include "chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energ y_event_router.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/extensions/extension_function_test_utils.h" 9 #include "chrome/browser/extensions/extension_function_test_utils.h"
10 #include "chrome/browser/extensions/extension_test_message_listener.h" 10 #include "chrome/browser/extensions/extension_test_message_listener.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 BluetoothLowEnergyApiTest() {} 94 BluetoothLowEnergyApiTest() {}
95 95
96 virtual ~BluetoothLowEnergyApiTest() {} 96 virtual ~BluetoothLowEnergyApiTest() {}
97 97
98 virtual void SetUpOnMainThread() OVERRIDE { 98 virtual void SetUpOnMainThread() OVERRIDE {
99 ExtensionApiTest::SetUpOnMainThread(); 99 ExtensionApiTest::SetUpOnMainThread();
100 empty_extension_ = utils::CreateEmptyExtension(); 100 empty_extension_ = utils::CreateEmptyExtension();
101 SetUpMocks(); 101 SetUpMocks();
102 } 102 }
103 103
104 virtual void CleanUpOnMainThread() OVERRIDE { 104 virtual void TearDownOnMainThread() OVERRIDE {
105 EXPECT_CALL(*mock_adapter_, RemoveObserver(_)); 105 EXPECT_CALL(*mock_adapter_, RemoveObserver(_));
106 } 106 }
107 107
108 void SetUpMocks() { 108 void SetUpMocks() {
109 mock_adapter_ = new testing::StrictMock<MockBluetoothAdapter>(); 109 mock_adapter_ = new testing::StrictMock<MockBluetoothAdapter>();
110 EXPECT_CALL(*mock_adapter_, GetDevices()) 110 EXPECT_CALL(*mock_adapter_, GetDevices())
111 .WillOnce(Return(BluetoothAdapter::ConstDeviceList())); 111 .WillOnce(Return(BluetoothAdapter::ConstDeviceList()));
112 112
113 event_router()->SetAdapterForTesting(mock_adapter_); 113 event_router()->SetAdapterForTesting(mock_adapter_);
114 114
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 1263 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
1264 event_router()->GattCharacteristicRemoved(service1_.get(), chrc2_.get()); 1264 event_router()->GattCharacteristicRemoved(service1_.get(), chrc2_.get());
1265 event_router()->GattCharacteristicRemoved(service0_.get(), chrc1_.get()); 1265 event_router()->GattCharacteristicRemoved(service0_.get(), chrc1_.get());
1266 event_router()->GattCharacteristicRemoved(service0_.get(), chrc0_.get()); 1266 event_router()->GattCharacteristicRemoved(service0_.get(), chrc0_.get());
1267 event_router()->GattServiceRemoved(device0_.get(), service1_.get()); 1267 event_router()->GattServiceRemoved(device0_.get(), service1_.get());
1268 event_router()->GattServiceRemoved(device0_.get(), service0_.get()); 1268 event_router()->GattServiceRemoved(device0_.get(), service0_.get());
1269 event_router()->DeviceRemoved(mock_adapter_, device0_.get()); 1269 event_router()->DeviceRemoved(mock_adapter_, device0_.get());
1270 } 1270 }
1271 1271
1272 } // namespace 1272 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698