OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/bind.h" |
| 6 #include "base/macros.h" |
| 7 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/browser/ui/browser_dialogs.h" |
| 9 #include "chrome/browser/ui/test/test_browser_dialog.h" |
| 10 #include "chrome/browser/ui/views/extensions/request_file_system_dialog_view.h" |
| 11 #include "chrome/test/base/in_process_browser_test.h" |
| 12 #include "content/public/test/browser_test.h" |
| 13 #include "testing/gmock/include/gmock/gmock.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 |
| 16 namespace { |
| 17 |
| 18 // Helper class to display the RequestFileSystemDialogView dialog for testing. |
| 19 class RequestFileSystemDialogTest : public DialogBrowserTest { |
| 20 public: |
| 21 RequestFileSystemDialogTest() {} |
| 22 |
| 23 void ShowDialog(const std::string& name) override { |
| 24 RequestFileSystemDialogView::ShowDialog( |
| 25 browser()->tab_strip_model()->GetActiveWebContents(), |
| 26 "RequestFileSystemDialogTest", |
| 27 "TestVolume", |
| 28 base::Bind(&RequestFileSystemDialogTest::DialogCallback, |
| 29 base::Unretained(this)); |
| 30 } |
| 31 |
| 32 void DialogCallback(ui::DialogButton button) {} |
| 33 |
| 34 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(SRTPromptDialogTest); |
| 36 }; |
| 37 |
| 38 IN_PROC_BROWSER_TEST_F(RequestFileSystemDialogTest, InvokeDialog_default) { |
| 39 RunDialog(); |
| 40 } |
| 41 |
| 42 } // namespace |
OLD | NEW |