| 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/tabs/tab_strip_model.h" | |
| 10 #include "chrome/browser/ui/test/test_browser_dialog.h" | |
| 11 #include "chrome/browser/ui/views/extensions/request_file_system_dialog_view.h" | |
| 12 #include "chrome/test/base/in_process_browser_test.h" | |
| 13 #include "content/public/test/browser_test.h" | |
| 14 #include "testing/gmock/include/gmock/gmock.h" | |
| 15 #include "testing/gtest/include/gtest/gtest.h" | |
| 16 | |
| 17 namespace { | |
| 18 | |
| 19 // Helper class to display the RequestFileSystemDialogView dialog for testing. | |
| 20 class RequestFileSystemDialogTest : public DialogBrowserTest { | |
| 21 public: | |
| 22 RequestFileSystemDialogTest() {} | |
| 23 | |
| 24 void ShowDialog(const std::string& name) override { | |
| 25 RequestFileSystemDialogView::ShowDialog( | |
| 26 browser()->tab_strip_model()->GetActiveWebContents(), | |
| 27 "RequestFileSystemDialogTest", "TestVolume", true, | |
| 28 base::Bind(&RequestFileSystemDialogTest::DialogCallback)); | |
| 29 } | |
| 30 | |
| 31 private: | |
| 32 static void DialogCallback(ui::DialogButton button) {} | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(RequestFileSystemDialogTest); | |
| 35 }; | |
| 36 | |
| 37 IN_PROC_BROWSER_TEST_F(RequestFileSystemDialogTest, InvokeDialog_default) { | |
| 38 RunDialog(); | |
| 39 } | |
| 40 | |
| 41 } // namespace | |
| OLD | NEW |