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

Unified Diff: extensions/browser/api/bluetooth_socket/bluetooth_socket_apitest.cc

Issue 555633003: Use extensions::ResultCatcher; delete ExtensionApiTest::ResultCatcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 3 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: extensions/browser/api/bluetooth_socket/bluetooth_socket_apitest.cc
diff --git a/extensions/browser/api/bluetooth_socket/bluetooth_socket_apitest.cc b/extensions/browser/api/bluetooth_socket/bluetooth_socket_apitest.cc
index 4fefdc58e871ff152de503995aff683c06eb6b38..bb5d8d0bf243067dbcb0893bdc46c93a5251d41c 100644
--- a/extensions/browser/api/bluetooth_socket/bluetooth_socket_apitest.cc
+++ b/extensions/browser/api/bluetooth_socket/bluetooth_socket_apitest.cc
@@ -18,6 +18,7 @@
#include "device/bluetooth/test/mock_bluetooth_device.h"
#include "device/bluetooth/test/mock_bluetooth_socket.h"
#include "extensions/browser/api/bluetooth_socket/bluetooth_socket_api.h"
+#include "extensions/test/result_catcher.h"
#include "testing/gmock/include/gmock/gmock.h"
using device::BluetoothAdapter;
@@ -29,6 +30,7 @@ using device::MockBluetoothAdapter;
using device::MockBluetoothDevice;
using device::MockBluetoothSocket;
using extensions::Extension;
+using extensions::ResultCatcher;
namespace utils = extension_function_test_utils;
namespace api = extensions::core_api;
@@ -100,7 +102,7 @@ ACTION_TEMPLATE(InvokeCallbackArgument,
IN_PROC_BROWSER_TEST_F(BluetoothSocketApiTest, Connect) {
ResultCatcher catcher;
- catcher.RestrictToProfile(browser()->profile());
+ catcher.RestrictToBrowserContext(browser()->profile());
// Return the right mock device object for the address used by the test,
// return NULL for the "Device not found" test.
@@ -145,7 +147,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothSocketApiTest, Connect) {
#endif
IN_PROC_BROWSER_TEST_F(BluetoothSocketApiTest, MAYBE_Listen) {
ResultCatcher catcher;
- catcher.RestrictToProfile(browser()->profile());
+ catcher.RestrictToBrowserContext(browser()->profile());
// Return a mock socket object as a successful result to the create service
// call.
@@ -207,7 +209,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothSocketApiTest, MAYBE_Listen) {
IN_PROC_BROWSER_TEST_F(BluetoothSocketApiTest, PermissionDenied) {
ResultCatcher catcher;
- catcher.RestrictToProfile(browser()->profile());
+ catcher.RestrictToBrowserContext(browser()->profile());
// Run the test.
scoped_refptr<const Extension> extension(

Powered by Google App Engine
This is Rietveld 408576698