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

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

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase 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 (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 "extensions/browser/api/bluetooth/bluetooth_event_router.h" 5 #include "extensions/browser/api/bluetooth/bluetooth_event_router.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 scoped_refptr<const Extension> extension = 87 scoped_refptr<const Extension> extension =
88 ExtensionBuilder() 88 ExtensionBuilder()
89 .SetManifest(DictionaryBuilder() 89 .SetManifest(DictionaryBuilder()
90 .Set("name", "BT event router test") 90 .Set("name", "BT event router test")
91 .Set("version", "1.0") 91 .Set("version", "1.0")
92 .Set("manifest_version", 2) 92 .Set("manifest_version", 2)
93 .Build()) 93 .Build())
94 .SetID(kTestExtensionId) 94 .SetID(kTestExtensionId)
95 .Build(); 95 .Build();
96 96
97 ExtensionRegistry::Get(browser_context())->TriggerOnUnloaded( 97 ExtensionRegistry::Get(browser_context())
98 extension.get(), UnloadedExtensionInfo::REASON_DISABLE); 98 ->TriggerOnUnloaded(extension.get(),
99 UnloadedExtensionReason::REASON_DISABLE);
99 100
100 EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_)).Times(1); 101 EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_)).Times(1);
101 } 102 }
102 103
103 // This test check that calling SetDiscoveryFilter before StartDiscoverySession 104 // This test check that calling SetDiscoveryFilter before StartDiscoverySession
104 // for given extension will start session with proper filter. 105 // for given extension will start session with proper filter.
105 TEST_F(BluetoothEventRouterTest, SetDiscoveryFilter) { 106 TEST_F(BluetoothEventRouterTest, SetDiscoveryFilter) {
106 std::unique_ptr<device::BluetoothDiscoveryFilter> discovery_filter( 107 std::unique_ptr<device::BluetoothDiscoveryFilter> discovery_filter(
107 new device::BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE)); 108 new device::BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE));
108 109
(...skipping 12 matching lines...) Expand all
121 testing::_, testing::_)).Times(1); 122 testing::_, testing::_)).Times(1);
122 123
123 router_->StartDiscoverySession(mock_adapter_, kTestExtensionId, 124 router_->StartDiscoverySession(mock_adapter_, kTestExtensionId,
124 base::Bind(&base::DoNothing), 125 base::Bind(&base::DoNothing),
125 base::Bind(&base::DoNothing)); 126 base::Bind(&base::DoNothing));
126 127
127 EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_)).Times(1); 128 EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_)).Times(1);
128 } 129 }
129 130
130 } // namespace extensions 131 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698