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

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

Issue 2377553003: Add ShouldDisplayOverFullscreen support to web notifications. (Closed)
Patch Set: Removed erroneous isActive check Created 4 years, 3 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_test_util.cc
diff --git a/chrome/browser/notifications/notification_test_util.cc b/chrome/browser/notifications/notification_test_util.cc
index 41cf5217a7bf368cd1f88332f5d62c1b9684bf31..a4c6f0d5b674727484b5cc12f02d216191d1e61c 100644
--- a/chrome/browser/notifications/notification_test_util.cc
+++ b/chrome/browser/notifications/notification_test_util.cc
@@ -4,6 +4,11 @@
#include "chrome/browser/notifications/notification_test_util.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
+#include "content/public/test/test_utils.h"
+
+
Peter Beverloo 2016/09/29 21:30:51 micro nit: no double blank lines
bmalcolm 2016/09/29 21:37:13 Done.
MockNotificationDelegate::MockNotificationDelegate(const std::string& id)
: id_(id) {}
@@ -135,3 +140,14 @@ void StubNotificationUIManager::CancelAll() {
pair.first.delegate()->Close(false /* by_user */);
notifications_.clear();
}
+
+FullscreenStateWaiter::FullscreenStateWaiter(
+ Browser* browser, bool desired_state)
+ : browser_(browser),
+ desired_state_(desired_state) {}
+
+void FullscreenStateWaiter::Wait() {
+ while (desired_state_ !=
+ browser_->exclusive_access_manager()->context()->IsFullscreen())
+ content::RunAllPendingInMessageLoop();
Peter Beverloo 2016/09/29 21:30:51 nit: curly brackets for multi-line statements
bmalcolm 2016/09/29 21:37:13 Done.
+}

Powered by Google App Engine
This is Rietveld 408576698