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

Unified Diff: chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc

Issue 2963893002: [ui] Adds a browser_tests hook to show ZoomBubbleView (Closed)
Patch Set: [ui] Adds a browser_tests hook to show ZoomBubbleView (no command line) Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc b/chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc
index a442c392d4129805a4dd672088bd1c73c7706c84..8a09efc826b66daf560ce207b2562c72c3b50b98 100644
--- a/chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
#include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h"
+#include "chrome/browser/ui/test/test_browser_dialog.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
#include "chrome/test/base/in_process_browser_test.h"
@@ -139,3 +140,26 @@ IN_PROC_BROWSER_TEST_F(ZoomBubbleBrowserTest, ImmersiveFullscreen) {
}
}
#endif // OS_CHROMEOS
+
+class ZoomBubbleDialogTest : public DialogBrowserTest {
+ public:
+ ZoomBubbleDialogTest() {}
+
+ // DialogBrowserTest:
+ void ShowDialog(const std::string& name) override {
+ BrowserView* browser_view = static_cast<BrowserView*>(browser()->window());
+ content::WebContents* web_contents = browser_view->GetActiveWebContents();
+ ZoomBubbleView::ShowBubble(web_contents, gfx::Point(),
+ ZoomBubbleView::USER_GESTURE);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ZoomBubbleDialogTest);
+};
+
+// Test that calls ShowDialog("default"). Interactive when run via
+// browser_tests --gtest_filter=BrowserDialogTest.Invoke --interactive
+// --dialog=ZoomBubbleDialogTest.InvokeDialog_default
+IN_PROC_BROWSER_TEST_F(ZoomBubbleDialogTest, InvokeDialog_default) {
+ RunDialog();
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698