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

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

Issue 11117011: Keep browser process alive while there are platform apps with background pages running. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Delegated Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/bluetooth/bluetooth_apitest_chromeos.cc
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_apitest_chromeos.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_apitest_chromeos.cc
index b708b71f6bee7cd77bb2b45f93e2d7abb471aa13..8765668a24e2c9e0ac24ee608dabba0d00b18b07 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_apitest_chromeos.cc
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_apitest_chromeos.cc
@@ -332,6 +332,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, DiscoveryCallback) {
discovery_stopped.Reply("go");
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+ CloseShellWindowsAndWaitForAppToExit();
}
IN_PROC_BROWSER_TEST_F(BluetoothApiTest, DiscoveryInProgress) {
@@ -362,6 +363,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, DiscoveryInProgress) {
discovery_stopped.Reply("go");
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+ CloseShellWindowsAndWaitForAppToExit();
}
IN_PROC_BROWSER_TEST_F(BluetoothApiTest, Events) {
@@ -383,6 +385,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, Events) {
listener.Reply("go");
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+ CloseShellWindowsAndWaitForAppToExit();
}
IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetDevices) {
@@ -416,6 +419,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetDevices) {
listener.Reply("go");
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+ CloseShellWindowsAndWaitForAppToExit();
}
IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetDevicesConcurrently) {
@@ -427,9 +431,10 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetDevicesConcurrently) {
// Save the callback to delay execution so that we can force the calls to
// happen concurrently. This will be called after the listener is satisfied.
- BluetoothDevice::ProvidesServiceCallback callback;
+ BluetoothDevice::ProvidesServiceCallback* callback =
+ new BluetoothDevice::ProvidesServiceCallback;
EXPECT_CALL(*device1_, ProvidesServiceWithName(testing::_, testing::_))
- .WillOnce(testing::SaveArg<1>(&callback));
+ .WillOnce(testing::SaveArg<1>(callback));
EXPECT_CALL(*mock_adapter_, GetDevices())
.WillOnce(testing::Return(devices));
@@ -440,10 +445,12 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetDevicesConcurrently) {
test_data_dir_.AppendASCII("bluetooth/get_devices_concurrently")));
EXPECT_TRUE(listener.WaitUntilSatisfied());
- callback.Run(false);
+ callback->Run(false);
+ delete callback;
listener.Reply("go");
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+ CloseShellWindowsAndWaitForAppToExit();
}
IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetDevicesError) {
@@ -459,4 +466,5 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetDevicesError) {
listener.Reply("go");
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+ CloseShellWindowsAndWaitForAppToExit();
}

Powered by Google App Engine
This is Rietveld 408576698