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

Unified Diff: chrome/browser/safe_browsing/permission_reporter_browsertest.cc

Issue 2250163003: Permission Action Reporting: Fix flaky Browsertest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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/safe_browsing/mock_permission_report_sender.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/permission_reporter_browsertest.cc
diff --git a/chrome/browser/safe_browsing/permission_reporter_browsertest.cc b/chrome/browser/safe_browsing/permission_reporter_browsertest.cc
index 5131d4fb9a21d32a844a38660fa30026c83a31c3..256d2422ea64608b2b375206123d07bb0ea4ce3e 100644
--- a/chrome/browser/safe_browsing/permission_reporter_browsertest.cc
+++ b/chrome/browser/safe_browsing/permission_reporter_browsertest.cc
@@ -87,9 +87,8 @@ class PermissionReporterBrowserTest : public SyncTest {
};
// Test that permission action report will be sent if the user is opted into it.
-// TODO(kcarattini): Address crbug/638316 to reenable this test.
IN_PROC_BROWSER_TEST_F(PermissionReporterBrowserTest,
- DISABLED_PermissionActionReporting) {
+ PermissionActionReporting) {
// Set up the Sync client.
ASSERT_TRUE(SetupSync());
Profile* profile = GetProfile(0);
@@ -110,8 +109,10 @@ IN_PROC_BROWSER_TEST_F(PermissionReporterBrowserTest,
EXPECT_TRUE(mock_permission_prompt_factory->is_visible());
AcceptBubble(browser);
-
EXPECT_FALSE(mock_permission_prompt_factory->is_visible());
+
+ // We need to wait for the report to be sent on the IO thread.
+ mock_report_sender()->WaitForReportSent();
EXPECT_EQ(1, mock_report_sender()->GetAndResetNumberOfReportsSent());
PermissionReport permission_report;
« no previous file with comments | « chrome/browser/safe_browsing/mock_permission_report_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698