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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h" 5 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h"
6 #include "chrome/browser/ui/browser.h" 6 #include "chrome/browser/ui/browser.h"
7 #include "chrome/browser/ui/browser_window.h" 7 #include "chrome/browser/ui/browser_window.h"
8 #include "chrome/test/base/web_ui_browser_test.h" 8 #include "chrome/test/base/web_ui_browser_test.h"
9 #include "content/public/browser/web_ui.h" 9 #include "content/public/browser/web_ui.h"
10 #include "content/public/test/browser_test_utils.h" 10 #include "content/public/test/browser_test_utils.h"
11 #include "device/bluetooth/bluetooth_adapter_factory.h" 11 #include "device/bluetooth/bluetooth_adapter_factory.h"
12 #include "device/bluetooth/test/mock_bluetooth_adapter.h" 12 #include "device/bluetooth/test/mock_bluetooth_adapter.h"
13 #include "device/bluetooth/test/mock_bluetooth_device.h" 13 #include "device/bluetooth/test/mock_bluetooth_device.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 15
16 class BluetoothPairingUITest : public WebUIBrowserTest { 16 class BluetoothPairingUITest : public WebUIBrowserTest {
17 public: 17 public:
18 BluetoothPairingUITest(); 18 BluetoothPairingUITest();
19 ~BluetoothPairingUITest() override; 19 ~BluetoothPairingUITest() override;
20 20
21 void ShowDialog(); 21 void ShowDialog();
22 22
23 private: 23 private:
24 scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> mock_adapter_; 24 scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> mock_adapter_;
25 scoped_ptr<device::MockBluetoothDevice> mock_device_; 25 std::unique_ptr<device::MockBluetoothDevice> mock_device_;
26 }; 26 };
27 27
28 BluetoothPairingUITest::BluetoothPairingUITest() {} 28 BluetoothPairingUITest::BluetoothPairingUITest() {}
29 29
30 BluetoothPairingUITest::~BluetoothPairingUITest() {} 30 BluetoothPairingUITest::~BluetoothPairingUITest() {}
31 31
32 void BluetoothPairingUITest::ShowDialog() { 32 void BluetoothPairingUITest::ShowDialog() {
33 mock_adapter_ = new testing::NiceMock<device::MockBluetoothAdapter>(); 33 mock_adapter_ = new testing::NiceMock<device::MockBluetoothAdapter>();
34 device::BluetoothAdapterFactory::SetAdapterForTesting(mock_adapter_); 34 device::BluetoothAdapterFactory::SetAdapterForTesting(mock_adapter_);
35 EXPECT_CALL(*mock_adapter_, IsPresent()) 35 EXPECT_CALL(*mock_adapter_, IsPresent())
(...skipping 18 matching lines...) Expand all
54 chromeos::BluetoothPairingDialog* dialog = 54 chromeos::BluetoothPairingDialog* dialog =
55 new chromeos::BluetoothPairingDialog( 55 new chromeos::BluetoothPairingDialog(
56 browser()->window()->GetNativeWindow(), mock_device_.get()); 56 browser()->window()->GetNativeWindow(), mock_device_.get());
57 dialog->Show(); 57 dialog->Show();
58 58
59 content::WebUI* webui = dialog->GetWebUIForTest(); 59 content::WebUI* webui = dialog->GetWebUIForTest();
60 content::WebContents* webui_webcontents = webui->GetWebContents(); 60 content::WebContents* webui_webcontents = webui->GetWebContents();
61 content::WaitForLoadStop(webui_webcontents); 61 content::WaitForLoadStop(webui_webcontents);
62 SetWebUIInstance(webui); 62 SetWebUIInstance(webui);
63 } 63 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/browsing_history_handler.cc ('k') | chrome/browser/ui/webui/chromeos/certificate_manager_dialog_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698