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

Unified Diff: chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc

Issue 2825243002: DialogClientView: Handle nested close requests gracefully.
Patch Set: Self review 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
« no previous file with comments | « no previous file | ui/views/window/dialog_client_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc
diff --git a/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc b/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc
index f2122036ee38c9c6084caabfcc7d2e9b851a758a..28f9720e2d0be01ff5f3ecd7e36d818a9be341a9 100644
--- a/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc
+++ b/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc
@@ -92,12 +92,17 @@ void ExtensionMessageBubbleViewBrowserTest::SetUpCommandLine(
void ExtensionMessageBubbleViewBrowserTest::ShowDialog(
const std::string& name) {
- // TODO(tapted): Add cases for all bubble types.
- EXPECT_EQ("devmode_warning", name);
-
// When invoked this way, the dialog test harness must close the bubble.
base::AutoReset<bool> guard(&block_close_, true);
- TestBubbleAnchoredToExtensionAction();
+
+ if (name == "devmode_warning") {
+ TestBubbleAnchoredToExtensionAction();
+ } else if (name == "ntp_override") {
+ TestControlledNewTabPageBubbleShown();
+ } else {
+ // TODO(tapted): Add cases for all bubble types.
+ ADD_FAILURE() << "Unknown dialog: " << name;
+ }
}
void ExtensionMessageBubbleViewBrowserTest::CheckBubbleNative(
@@ -226,6 +231,13 @@ IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest,
TestControlledStartupNotShownOnRestart();
}
+// BrowserDialogTest for the warning bubble that appears when opening a new tab
+// and an extension is controlling it. Only shown on Windows.
+IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest,
+ InvokeDialog_ntp_override) {
+ RunDialog();
+}
+
#endif // defined(OS_WIN)
IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest,
« no previous file with comments | « no previous file | ui/views/window/dialog_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698