| OLD | NEW |
| 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 "ash/public/cpp/shell_window_ids.h" | 5 #include "ash/public/cpp/shell_window_ids.h" |
| 6 #include "base/auto_reset.h" | 6 #include "base/auto_reset.h" |
| 7 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h" | 7 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.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" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 0, | 50 0, |
| 51 "Bluetooth 2.0 Mouse", | 51 "Bluetooth 2.0 Mouse", |
| 52 "28:CF:DA:00:00:00", | 52 "28:CF:DA:00:00:00", |
| 53 kNotPaired, | 53 kNotPaired, |
| 54 kNotConnected)); | 54 kNotConnected)); |
| 55 | 55 |
| 56 EXPECT_CALL(*mock_adapter_, GetDevice(testing::_)) | 56 EXPECT_CALL(*mock_adapter_, GetDevice(testing::_)) |
| 57 .WillOnce(testing::Return(mock_device_.get())); | 57 .WillOnce(testing::Return(mock_device_.get())); |
| 58 | 58 |
| 59 chromeos::BluetoothPairingDialog* dialog = | 59 chromeos::BluetoothPairingDialog* dialog = |
| 60 new chromeos::BluetoothPairingDialog(mock_device_.get()); | 60 new chromeos::BluetoothPairingDialog( |
| 61 mock_device_->GetAddress(), mock_device_->GetNameForDisplay(), |
| 62 mock_device_->IsPaired(), mock_device_->IsConnected()); |
| 61 dialog->ShowInContainer(ash::kShellWindowId_SystemModalContainer); | 63 dialog->ShowInContainer(ash::kShellWindowId_SystemModalContainer); |
| 62 | 64 |
| 63 content::WebUI* webui = dialog->GetWebUIForTest(); | 65 content::WebUI* webui = dialog->GetWebUIForTest(); |
| 64 content::WebContents* webui_webcontents = webui->GetWebContents(); | 66 content::WebContents* webui_webcontents = webui->GetWebContents(); |
| 65 content::WaitForLoadStop(webui_webcontents); | 67 content::WaitForLoadStop(webui_webcontents); |
| 66 SetWebUIInstance(webui); | 68 SetWebUIInstance(webui); |
| 67 } | 69 } |
| OLD | NEW |