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

Unified Diff: chrome/browser/extensions/request_file_system_dialog_browsertest.cc

Issue 2816293002: Description: Replace layout constants in chrome/browser/extensions and chrome/browser/first_run (Closed)
Patch Set: Review comments Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/request_file_system_dialog_browsertest.cc
diff --git a/chrome/browser/extensions/request_file_system_dialog_browsertest.cc b/chrome/browser/extensions/request_file_system_dialog_browsertest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2e7c6745de6b1b1bd87d3038b5c41ea3b3c2fd77
--- /dev/null
+++ b/chrome/browser/extensions/request_file_system_dialog_browsertest.cc
@@ -0,0 +1,42 @@
+// 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.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/bind.h"
+#include "base/macros.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_dialogs.h"
+#include "chrome/browser/ui/test/test_browser_dialog.h"
+#include "chrome/browser/ui/views/extensions/request_file_system_dialog_view.h"
+#include "chrome/test/base/in_process_browser_test.h"
+#include "content/public/test/browser_test.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace {
+
+// Helper class to display the RequestFileSystemDialogView dialog for testing.
+class RequestFileSystemDialogTest : public DialogBrowserTest {
+ public:
+ RequestFileSystemDialogTest() {}
+
+ void ShowDialog(const std::string& name) override {
+ RequestFileSystemDialogView::ShowDialog(
+ browser()->tab_strip_model()->GetActiveWebContents(),
+ "RequestFileSystemDialogTest",
+ "TestVolume",
+ base::Bind(&RequestFileSystemDialogTest::DialogCallback,
+ base::Unretained(this));
+ }
+
+ void DialogCallback(ui::DialogButton button) {}
lazyboy 2017/04/27 16:46:13 nit: private, static
ananta 2017/04/27 18:37:47 Done.
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SRTPromptDialogTest);
+};
+
+IN_PROC_BROWSER_TEST_F(RequestFileSystemDialogTest, InvokeDialog_default) {
+ RunDialog();
+}
+
+} // namespace

Powered by Google App Engine
This is Rietveld 408576698