OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/strings/string_number_conversions.h" | 5 #include "base/strings/string_number_conversions.h" |
6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/test/scoped_feature_list.h" | 8 #include "base/test/scoped_feature_list.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/apps/app_browsertest_util.h" | 10 #include "chrome/browser/apps/app_browsertest_util.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 ->user_gesture()); | 92 ->user_gesture()); |
93 if (waiting_) | 93 if (waiting_) |
94 base::MessageLoopForUI::current()->QuitWhenIdle(); | 94 base::MessageLoopForUI::current()->QuitWhenIdle(); |
95 } | 95 } |
96 | 96 |
97 content::NotificationRegistrar registrar_; | 97 content::NotificationRegistrar registrar_; |
98 | 98 |
99 // A sequential list of user gesture notifications from the test extension(s). | 99 // A sequential list of user gesture notifications from the test extension(s). |
100 std::deque<bool> results_; | 100 std::deque<bool> results_; |
101 | 101 |
102 // True if we're in a nested message loop waiting for results from | 102 // True if we're in a nested run loop waiting for results from |
103 // the extension. | 103 // the extension. |
104 bool waiting_; | 104 bool waiting_; |
105 }; | 105 }; |
106 | 106 |
107 enum class WindowState { | 107 enum class WindowState { |
108 FULLSCREEN, | 108 FULLSCREEN, |
109 NORMAL | 109 NORMAL |
110 }; | 110 }; |
111 | 111 |
112 class NotificationsApiTest : public ExtensionApiTest { | 112 class NotificationsApiTest : public ExtensionApiTest { |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 ASSERT_TRUE(GetFirstAppWindow(extension->id())->GetBaseWindow()->IsActive()) | 546 ASSERT_TRUE(GetFirstAppWindow(extension->id())->GetBaseWindow()->IsActive()) |
547 << "Not Active"; | 547 << "Not Active"; |
548 | 548 |
549 Notification* notification = GetNotificationForExtension(extension); | 549 Notification* notification = GetNotificationForExtension(extension); |
550 ASSERT_TRUE(notification); | 550 ASSERT_TRUE(notification); |
551 | 551 |
552 // The extension's window is being shown and focused, so its expected that | 552 // The extension's window is being shown and focused, so its expected that |
553 // the notification displays on top of it. | 553 // the notification displays on top of it. |
554 ASSERT_TRUE(notification->delegate()->ShouldDisplayOverFullscreen()); | 554 ASSERT_TRUE(notification->delegate()->ShouldDisplayOverFullscreen()); |
555 } | 555 } |
OLD | NEW |