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

Unified Diff: chrome/browser/ui/extensions/extension_installed_bubble_browsertest.cc

Issue 1779343002: [Extensions] Update installed bubble for extensions with synthesized actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 | « chrome/browser/ui/extensions/extension_installed_bubble.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/extensions/extension_installed_bubble_browsertest.cc
diff --git a/chrome/browser/ui/extensions/extension_installed_bubble_browsertest.cc b/chrome/browser/ui/extensions/extension_installed_bubble_browsertest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ccaca98f96a591381242b265e9dc8229be6b45b3
--- /dev/null
+++ b/chrome/browser/ui/extensions/extension_installed_bubble_browsertest.cc
@@ -0,0 +1,43 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/extension_action_test_util.h"
+#include "chrome/browser/extensions/extension_browsertest.h"
+#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/ui/extensions/extension_installed_bubble.h"
+
+using ExtensionInstalledBubbleBrowserTest = ExtensionBrowserTest;
+
+IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleBrowserTest,
+ DoNotShowHowToUseForSynthesizedActions) {
+ const SkBitmap kEmptyBitmap;
+ {
+ scoped_refptr<const extensions::Extension> extension =
+ extensions::extension_action_test_util::CreateActionExtension(
+ "No action", extensions::extension_action_test_util::NO_ACTION);
+ extension_service()->AddExtension(extension.get());
+ ExtensionInstalledBubble bubble(extension.get(), browser(), kEmptyBitmap);
+ bubble.Initialize();
+ EXPECT_EQ(0, bubble.options() & ExtensionInstalledBubble::HOW_TO_USE);
+ }
+ {
+ scoped_refptr<const extensions::Extension> extension =
+ extensions::extension_action_test_util::CreateActionExtension(
+ "Browser action",
+ extensions::extension_action_test_util::BROWSER_ACTION);
+ extension_service()->AddExtension(extension.get());
+ ExtensionInstalledBubble bubble(extension.get(), browser(), kEmptyBitmap);
+ bubble.Initialize();
+ EXPECT_NE(0, bubble.options() & ExtensionInstalledBubble::HOW_TO_USE);
+ }
+ {
+ scoped_refptr<const extensions::Extension> extension =
+ extensions::extension_action_test_util::CreateActionExtension(
+ "Page action", extensions::extension_action_test_util::PAGE_ACTION);
+ extension_service()->AddExtension(extension.get());
+ ExtensionInstalledBubble bubble(extension.get(), browser(), kEmptyBitmap);
+ bubble.Initialize();
+ EXPECT_NE(0, bubble.options() & ExtensionInstalledBubble::HOW_TO_USE);
+ }
+}
« no previous file with comments | « chrome/browser/ui/extensions/extension_installed_bubble.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698