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

Unified Diff: chrome/browser/extensions/api/bluetooth/bluetooth_apitest.cc

Issue 11368145: Lazy-creates BluetoothAdapter in ExtensionBluetoothEventRouter (EBEE). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use GetMutableAdapter Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/bluetooth_event_router.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/bluetooth/bluetooth_apitest.cc
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_apitest.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_apitest.cc
index 50452e7a7dba92197f398d8a2cb9ab45d8109bff..4fd20aedfdb529a113d36f3c94e4c8f717aa8953 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_apitest.cc
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_apitest.cc
@@ -59,7 +59,7 @@ class BluetoothApiTest : public ExtensionApiTest {
}
virtual void CleanUpOnMainThread() OVERRIDE {
- EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_));
+ event_router()->SetAdapterForTest(NULL);
}
void expectBooleanResult(bool expected,
@@ -379,6 +379,8 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, Events) {
event_router()->AdapterDiscoveringChanged(mock_adapter_, false);
listener.Reply("go");
+ EXPECT_CALL(*mock_adapter_,
+ RemoveObserver(testing::_)).WillOnce(testing::Return());
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}
« no previous file with comments | « no previous file | chrome/browser/extensions/bluetooth_event_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698