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

Unified Diff: chrome/browser/ui/permission_bubble/mock_permission_prompt.cc

Issue 2919323002: Support "learn more" link for EME in PermissionRequestManager code-path on Android (Closed)
Patch Set: address comments 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 | « chrome/browser/ui/android/infobars/grouped_permission_infobar.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/permission_bubble/mock_permission_prompt.cc
diff --git a/chrome/browser/ui/permission_bubble/mock_permission_prompt.cc b/chrome/browser/ui/permission_bubble/mock_permission_prompt.cc
index 2618143e41f8bf3b7f10a5e75ccce78ab04c2a2e..87f38013015015a2db38d93a718eb8bab53ef764 100644
--- a/chrome/browser/ui/permission_bubble/mock_permission_prompt.cc
+++ b/chrome/browser/ui/permission_bubble/mock_permission_prompt.cc
@@ -8,6 +8,11 @@
#include "base/run_loop.h"
#include "chrome/browser/permissions/permission_request_manager.h"
#include "chrome/browser/ui/permission_bubble/mock_permission_prompt_factory.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+#if !defined(OS_ANDROID)
+#include "ui/gfx/vector_icon_types.h"
+#endif
MockPermissionPrompt::~MockPermissionPrompt() {
Hide();
@@ -20,6 +25,14 @@ void MockPermissionPrompt::Show() {
for (const PermissionRequest* request : manager_->requests_) {
factory_->request_types_seen_.push_back(
request->GetPermissionRequestType());
+ // The actual prompt will call these, so test they're sane.
+ EXPECT_FALSE(request->GetMessageTextFragment().empty());
+#if defined(OS_ANDROID)
+ EXPECT_FALSE(request->GetMessageText().empty());
+ EXPECT_NE(0, request->GetIconId());
+#else
+ EXPECT_FALSE(request->GetIconId().is_empty());
+#endif
}
factory_->UpdateResponseType();
is_visible_ = true;
« no previous file with comments | « chrome/browser/ui/android/infobars/grouped_permission_infobar.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698