Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
|
lazyboy
2017/04/27 16:46:13
Should this file be moved to the directory where r
ananta
2017/04/27 18:37:47
Done.
| |
| 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) {} | |
|
lazyboy
2017/04/27 16:46:13
nit: private, static
ananta
2017/04/27 18:37:47
Done.
| |
| 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 |