diff options
author | yoz <yoz@chromium.org> | 2014-09-09 16:16:32 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-09 23:27:26 +0000 |
commit | e8dc2f1ff837e32b9d02d65ab520d16187450bf9 (patch) | |
tree | b5c8ef60f013a1a38e8e3f3bf78a8bed3351b100 /extensions | |
parent | ea76f5f5c3d6e0f73876d040265ad121346e9f3d (diff) | |
download | chromium_src-e8dc2f1ff837e32b9d02d65ab520d16187450bf9.zip chromium_src-e8dc2f1ff837e32b9d02d65ab520d16187450bf9.tar.gz chromium_src-e8dc2f1ff837e32b9d02d65ab520d16187450bf9.tar.bz2 |
Use extensions::ResultCatcher; delete ExtensionApiTest::ResultCatcher.
BUG=388893
Review URL: https://codereview.chromium.org/555633003
Cr-Commit-Position: refs/heads/master@{#294031}
Diffstat (limited to 'extensions')
8 files changed, 51 insertions, 45 deletions
diff --git a/extensions/DEPS b/extensions/DEPS index 91be1a7..e6b483f 100644 --- a/extensions/DEPS +++ b/extensions/DEPS @@ -7,6 +7,7 @@ include_rules = [ "+content/public/common", "+content/public/test", "+crypto", + "+extensions/test", "+grit/extensions_renderer_resources.h", "+grit/extensions_resources.h", "+mojo/public", diff --git a/extensions/browser/api/bluetooth/bluetooth_apitest.cc b/extensions/browser/api/bluetooth/bluetooth_apitest.cc index b62982f..866cb0b 100644 --- a/extensions/browser/api/bluetooth/bluetooth_apitest.cc +++ b/extensions/browser/api/bluetooth/bluetooth_apitest.cc @@ -19,6 +19,7 @@ #include "device/bluetooth/test/mock_bluetooth_discovery_session.h" #include "extensions/browser/api/bluetooth/bluetooth_api.h" #include "extensions/browser/api/bluetooth/bluetooth_event_router.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::MockBluetoothDiscoverySession; using extensions::Extension; +using extensions::ResultCatcher; namespace utils = extension_function_test_utils; namespace api = extensions::core_api; @@ -142,7 +144,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetAdapterState) { IN_PROC_BROWSER_TEST_F(BluetoothApiTest, DeviceEvents) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); ASSERT_TRUE(LoadExtension( test_data_dir_.AppendASCII("bluetooth/device_events"))); @@ -230,7 +232,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, DiscoveryCallback) { .WillOnce(testing::Invoke(StopDiscoverySessionCallback)); ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); ExtensionTestMessageListener discovery_started("ready", true); ASSERT_TRUE(LoadExtension( @@ -270,7 +272,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, DiscoveryInProgress) { event_router()->DeviceAdded(mock_adapter_, device1_.get()); ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); mock_session_.reset(new testing::NiceMock<MockBluetoothDiscoverySession>()); MockBluetoothDiscoverySession* session = mock_session_.get(); @@ -305,7 +307,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, DiscoveryInProgress) { IN_PROC_BROWSER_TEST_F(BluetoothApiTest, OnAdapterStateChanged) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); // Load and wait for setup ExtensionTestMessageListener listener("ready", true); @@ -357,7 +359,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, OnAdapterStateChanged) { IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetDevices) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); BluetoothAdapter::ConstDeviceList devices; devices.push_back(device1_.get()); @@ -380,7 +382,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetDevices) { IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetDevice) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); EXPECT_CALL(*mock_adapter_, GetDevice(device1_->GetAddress())) .WillOnce(testing::Return(device1_.get())); @@ -401,7 +403,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetDevice) { IN_PROC_BROWSER_TEST_F(BluetoothApiTest, DeviceInfo) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); // Set up the first device object to reflect a real-world device. BluetoothAdapter::ConstDeviceList devices; diff --git a/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc b/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc index ac09e45..e09f4141 100644 --- a/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc +++ b/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc @@ -15,6 +15,7 @@ #include "device/bluetooth/test/mock_bluetooth_gatt_service.h" #include "extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h" #include "extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h" +#include "extensions/test/result_catcher.h" #include "testing/gmock/include/gmock/gmock.h" using device::BluetoothUUID; @@ -33,6 +34,7 @@ using device::MockBluetoothGattDescriptor; using device::MockBluetoothGattService; using device::MockBluetoothGattNotifySession; using extensions::BluetoothLowEnergyEventRouter; +using extensions::ResultCatcher; using testing::Invoke; using testing::Return; using testing::ReturnRef; @@ -260,7 +262,7 @@ BluetoothGattConnection* CreateGattConnection( IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetServices) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); std::vector<BluetoothGattService*> services; services.push_back(service0_.get()); @@ -289,7 +291,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetServices) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetService) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); event_router()->GattServiceAdded( mock_adapter_, device0_.get(), service0_.get()); @@ -320,7 +322,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetService) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, ServiceEvents) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); // Load the extension and let it set up. ExtensionTestMessageListener listener("ready", true); @@ -356,7 +358,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, ServiceEvents) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetRemovedService) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); // Load the extension and let it set up. ASSERT_TRUE(LoadExtension( @@ -401,7 +403,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetRemovedService) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetIncludedServices) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII( "bluetooth_low_energy/get_included_services"))); @@ -443,7 +445,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetIncludedServices) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetCharacteristics) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); std::vector<BluetoothGattCharacteristic*> characteristics; characteristics.push_back(chrc0_.get()); @@ -477,7 +479,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetCharacteristics) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetCharacteristic) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); event_router()->GattServiceAdded( mock_adapter_, device0_.get(), service0_.get()); @@ -515,7 +517,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetCharacteristic) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, CharacteristicProperties) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); event_router()->GattServiceAdded( mock_adapter_, device0_.get(), service0_.get()); @@ -575,7 +577,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, CharacteristicProperties) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetRemovedCharacteristic) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); EXPECT_CALL(*mock_adapter_, GetDevice(_)) .Times(1) @@ -619,7 +621,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetRemovedCharacteristic) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, CharacteristicValueChanged) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); // Cause events to be sent to the extension. event_router()->GattServiceAdded( @@ -688,7 +690,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, CharacteristicValueChanged) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, ReadCharacteristicValue) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); event_router()->GattServiceAdded( mock_adapter_, device0_.get(), service0_.get()); @@ -728,7 +730,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, ReadCharacteristicValue) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, WriteCharacteristicValue) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); event_router()->GattServiceAdded( mock_adapter_, device0_.get(), service0_.get()); @@ -770,7 +772,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, WriteCharacteristicValue) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetDescriptors) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); std::vector<BluetoothGattDescriptor*> descriptors; descriptors.push_back(desc0_.get()); @@ -811,7 +813,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetDescriptors) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetDescriptor) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); event_router()->GattServiceAdded( mock_adapter_, device0_.get(), service0_.get()); @@ -856,7 +858,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetDescriptor) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetRemovedDescriptor) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); EXPECT_CALL(*mock_adapter_, GetDevice(_)) .Times(1) @@ -907,7 +909,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GetRemovedDescriptor) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, DescriptorValueChanged) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); event_router()->GattServiceAdded( mock_adapter_, device0_.get(), service0_.get()); @@ -940,7 +942,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, DescriptorValueChanged) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, ReadDescriptorValue) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); event_router()->GattServiceAdded( mock_adapter_, device0_.get(), service0_.get()); @@ -986,7 +988,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, ReadDescriptorValue) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, WriteDescriptorValue) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); event_router()->GattServiceAdded( mock_adapter_, device0_.get(), service0_.get()); @@ -1034,7 +1036,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, WriteDescriptorValue) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, PermissionDenied) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII( "bluetooth_low_energy/permission_denied"))); @@ -1043,7 +1045,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, PermissionDenied) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, UuidPermissionMethods) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); event_router()->GattServiceAdded( mock_adapter_, device0_.get(), service0_.get()); @@ -1075,7 +1077,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, UuidPermissionMethods) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, UuidPermissionEvents) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); ExtensionTestMessageListener listener("ready", true); ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII( @@ -1106,8 +1108,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, UuidPermissionEvents) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GattConnection) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); - + catcher.RestrictToBrowserContext(browser()->profile()); EXPECT_CALL(*mock_adapter_, GetDevice(_)) .WillRepeatedly(Return(static_cast<BluetoothDevice*>(NULL))); @@ -1137,8 +1138,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GattConnection) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, ReconnectAfterDisconnected) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); - + catcher.RestrictToBrowserContext(browser()->profile()); EXPECT_CALL(*mock_adapter_, GetDevice(kTestLeDeviceAddress0)) .WillRepeatedly(Return(device0_.get())); @@ -1167,8 +1167,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, ReconnectAfterDisconnected) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, ConnectInProgress) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); - + catcher.RestrictToBrowserContext(browser()->profile()); EXPECT_CALL(*mock_adapter_, GetDevice(kTestLeDeviceAddress0)) .WillRepeatedly(Return(device0_.get())); @@ -1205,7 +1204,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, ConnectInProgress) { IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, StartStopNotifications) { ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + catcher.RestrictToBrowserContext(browser()->profile()); event_router()->GattServiceAdded( mock_adapter_, device0_.get(), service0_.get()); diff --git a/extensions/browser/api/bluetooth_socket/bluetooth_socket_apitest.cc b/extensions/browser/api/bluetooth_socket/bluetooth_socket_apitest.cc index 4fefdc5..bb5d8d0 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( diff --git a/extensions/browser/api/cast_channel/cast_channel_apitest.cc b/extensions/browser/api/cast_channel/cast_channel_apitest.cc index 322a547..289c71e 100644 --- a/extensions/browser/api/cast_channel/cast_channel_apitest.cc +++ b/extensions/browser/api/cast_channel/cast_channel_apitest.cc @@ -15,6 +15,7 @@ #include "extensions/browser/api/cast_channel/logger.h" #include "extensions/common/api/cast_channel.h" #include "extensions/common/switches.h" +#include "extensions/test/result_catcher.h" #include "net/base/capturing_net_log.h" #include "net/base/completion_callback.h" #include "net/base/net_errors.h" @@ -247,7 +248,7 @@ IN_PROC_BROWSER_TEST_F(CastChannelAPITest, MAYBE_TestOpenReceiveClose) { EXPECT_TRUE(RunExtensionSubtest("cast_channel/api", "test_open_receive_close.html")); - ResultCatcher catcher; + extensions::ResultCatcher catcher; CallOnMessage("some-message"); CallOnMessage("some-message"); EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); diff --git a/extensions/browser/api/runtime/runtime_apitest.cc b/extensions/browser/api/runtime/runtime_apitest.cc index 2f92756..764e22e 100644 --- a/extensions/browser/api/runtime/runtime_apitest.cc +++ b/extensions/browser/api/runtime/runtime_apitest.cc @@ -11,6 +11,7 @@ #include "content/public/browser/notification_service.h" #include "extensions/browser/api/runtime/runtime_api.h" #include "extensions/browser/extension_registry.h" +#include "extensions/test/result_catcher.h" #include "net/test/embedded_test_server/embedded_test_server.h" // Tests the privileged components of chrome.runtime. @@ -25,7 +26,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeUnprivileged) { LoadExtension(test_data_dir_.AppendASCII("runtime/content_script"))); // The content script runs on webpage.html. - ResultCatcher catcher; + extensions::ResultCatcher catcher; ui_test_utils::NavigateToURL(browser(), embedded_test_server()->GetURL("/webpage.html")); EXPECT_TRUE(catcher.GetNextResult()) << message_; diff --git a/extensions/browser/api/serial/serial_apitest.cc b/extensions/browser/api/serial/serial_apitest.cc index 22089c9c..db7617a 100644 --- a/extensions/browser/api/serial/serial_apitest.cc +++ b/extensions/browser/api/serial/serial_apitest.cc @@ -10,6 +10,7 @@ #include "extensions/browser/api/serial/serial_connection.h" #include "extensions/browser/extension_function.h" #include "extensions/common/api/serial.h" +#include "extensions/test/result_catcher.h" #include "testing/gmock/include/gmock/gmock.h" using testing::_; @@ -114,8 +115,8 @@ ExtensionFunction* FakeSerialConnectFunctionFactory() { // #define SIMULATE_SERIAL_PORTS (1) IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialFakeHardware) { - ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + extensions::ResultCatcher catcher; + catcher.RestrictToBrowserContext(browser()->profile()); #if SIMULATE_SERIAL_PORTS ASSERT_TRUE(extensions::ExtensionFunctionDispatcher::OverrideFunction( @@ -128,8 +129,8 @@ IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialFakeHardware) { } IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialRealHardware) { - ResultCatcher catcher; - catcher.RestrictToProfile(browser()->profile()); + extensions::ResultCatcher catcher; + catcher.RestrictToBrowserContext(browser()->profile()); ASSERT_TRUE(RunExtensionTest("serial/real_hardware")) << message_; } diff --git a/extensions/test/result_catcher.h b/extensions/test/result_catcher.h index 43ebc27..f389f85 100644 --- a/extensions/test/result_catcher.h +++ b/extensions/test/result_catcher.h @@ -23,7 +23,6 @@ namespace extensions { // GetNextResult() and message() if GetNextResult() return false. If there // are no results, this method will pump the UI message loop until one is // received. -// TODO(yoz): Replace the version in ExtensionApiTest with this. class ResultCatcher : public content::NotificationObserver { public: ResultCatcher(); |