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

Unified Diff: chrome/browser/notifications/notification_permission_context_unittest.cc

Issue 1743143002: Remove WebContents::Was{Hidden,Shown}() from the content public interface Base URL: https://chromium.googlesource.com/chromium/src.git@20160225-WebContents-DicardCursorRects
Patch Set: Fix androido Created 4 years, 10 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
Index: chrome/browser/notifications/notification_permission_context_unittest.cc
diff --git a/chrome/browser/notifications/notification_permission_context_unittest.cc b/chrome/browser/notifications/notification_permission_context_unittest.cc
index d39d1af653102b923faeaa60db094f8cbf91db1c..0c9d2596b2be109f4602ef1ca643dd8f6e99b11f 100644
--- a/chrome/browser/notifications/notification_permission_context_unittest.cc
+++ b/chrome/browser/notifications/notification_permission_context_unittest.cc
@@ -166,9 +166,9 @@ TEST_F(NotificationPermissionContextTest, TestDenyInIncognitoAfterDelay) {
// Should be blocked after 1-2 seconds, but the timer is reset whenever the
// tab is not visible, so these 500ms never add up to >= 1 second.
for (int n = 0; n < 10; n++) {
- web_contents()->WasShown();
+ SimulateShow();
task_runner->FastForwardBy(base::TimeDelta::FromMilliseconds(500));
- web_contents()->WasHidden();
+ SimulateHide();
}
EXPECT_EQ(0, permission_context.permission_set_count());
@@ -189,7 +189,7 @@ TEST_F(NotificationPermissionContextTest, TestDenyInIncognitoAfterDelay) {
permission_context.GetContentSettingFromMap(url, url));
// Should be blocked after 1-2 seconds. So 500ms is not enough.
- web_contents()->WasShown();
+ SimulateShow();
task_runner->FastForwardBy(base::TimeDelta::FromMilliseconds(500));
EXPECT_EQ(0, permission_context.permission_set_count());
@@ -247,7 +247,7 @@ TEST_F(NotificationPermissionContextTest, TestParallelDenyInIncognito) {
profile()->GetOffTheRecordProfile());
GURL url("https://www.example.com");
NavigateAndCommit(url);
- web_contents()->WasShown();
+ SimulateShow();
const PermissionRequestID id0(web_contents()->GetRenderProcessHost()->GetID(),
web_contents()->GetMainFrame()->GetRoutingID(),

Powered by Google App Engine
This is Rietveld 408576698