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

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

Issue 2377553003: Add ShouldDisplayOverFullscreen support to web notifications. (Closed)
Patch Set: Final formatting fixes 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..a04690e696d383b5582c57ae1ce24ec83d585663 100644
--- a/chrome/browser/notifications/notification_test_util.cc
+++ b/chrome/browser/notifications/notification_test_util.cc
@@ -4,6 +4,10 @@
#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"
+
MockNotificationDelegate::MockNotificationDelegate(const std::string& id)
: id_(id) {}
@@ -135,3 +139,15 @@ 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();
+ }
+}
« no previous file with comments | « chrome/browser/notifications/notification_test_util.h ('k') | chrome/browser/notifications/persistent_notification_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698