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

Unified Diff: chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui_browsertest-inl.h

Issue 2017113002: [Extensions] DCHECK that ExtensionFunctions respond (and only once) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui_browsertest-inl.h
diff --git a/chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui_browsertest-inl.h b/chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui_browsertest-inl.h
index 36a2252429fe03cb04a8295547785f3bc26bb968..093f426cec106111ce104420b2d107bc62d0a0e1 100644
--- a/chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui_browsertest-inl.h
+++ b/chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui_browsertest-inl.h
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/auto_reset.h"
#include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
@@ -11,6 +12,7 @@
#include "device/bluetooth/bluetooth_adapter_factory.h"
#include "device/bluetooth/test/mock_bluetooth_adapter.h"
#include "device/bluetooth/test/mock_bluetooth_device.h"
+#include "extensions/browser/extension_function.h"
#include "testing/gmock/include/gmock/gmock.h"
class BluetoothPairingUITest : public WebUIBrowserTest {
@@ -30,6 +32,10 @@ BluetoothPairingUITest::BluetoothPairingUITest() {}
BluetoothPairingUITest::~BluetoothPairingUITest() {}
void BluetoothPairingUITest::ShowDialog() {
+ // Since we use mocks, callbacks are never called for the bluetooth API
+ // functions. :(
+ base::AutoReset<bool> ignore_did_respond(
+ &ExtensionFunction::ignore_all_did_respond_for_testing_do_not_use, true);
mock_adapter_ = new testing::NiceMock<device::MockBluetoothAdapter>();
device::BluetoothAdapterFactory::SetAdapterForTesting(mock_adapter_);
EXPECT_CALL(*mock_adapter_, IsPresent())

Powered by Google App Engine
This is Rietveld 408576698