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

Side by Side Diff: chrome/browser/extensions/extension_storage_monitor_browsertest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 void WriteBytes(const Extension* extension, 153 void WriteBytes(const Extension* extension,
154 int num_bytes, 154 int num_bytes,
155 bool expected_notification) { 155 bool expected_notification) {
156 ExtensionTestMessageListener launched_listener("launched", true); 156 ExtensionTestMessageListener launched_listener("launched", true);
157 ExtensionTestMessageListener write_complete_listener( 157 ExtensionTestMessageListener write_complete_listener(
158 "write_complete", false); 158 "write_complete", false);
159 NotificationObserver notification_observer( 159 NotificationObserver notification_observer(
160 GetNotificationId(extension->id())); 160 GetNotificationId(extension->id()));
161 161
162 OpenApplication(AppLaunchParams(profile(), extension, LAUNCH_CONTAINER_NONE, 162 OpenApplication(AppLaunchParams(profile(), extension, LAUNCH_CONTAINER_NONE,
163 NEW_WINDOW, extensions::SOURCE_TEST)); 163 WindowOpenDisposition::NEW_WINDOW,
164 extensions::SOURCE_TEST));
164 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); 165 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
165 166
166 // Instruct the app to write |num_bytes| of data. 167 // Instruct the app to write |num_bytes| of data.
167 launched_listener.Reply(base::IntToString(num_bytes)); 168 launched_listener.Reply(base::IntToString(num_bytes));
168 ASSERT_TRUE(write_complete_listener.WaitUntilSatisfied()); 169 ASSERT_TRUE(write_complete_listener.WaitUntilSatisfied());
169 170
170 if (expected_notification) { 171 if (expected_notification) {
171 EXPECT_TRUE(notification_observer.WaitForNotification()); 172 EXPECT_TRUE(notification_observer.WaitForNotification());
172 } else { 173 } else {
173 base::RunLoop().RunUntilIdle(); 174 base::RunLoop().RunUntilIdle();
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 ScopedTestDialogAutoConfirm::ACCEPT); 268 ScopedTestDialogAutoConfirm::ACCEPT);
268 TestExtensionRegistryObserver observer(ExtensionRegistry::Get(profile()), 269 TestExtensionRegistryObserver observer(ExtensionRegistry::Get(profile()),
269 extension->id()); 270 extension->id());
270 message_center::MessageCenter::Get()->ClickOnNotificationButton( 271 message_center::MessageCenter::Get()->ClickOnNotificationButton(
271 GetNotificationId(extension->id()), 272 GetNotificationId(extension->id()),
272 ExtensionStorageMonitor::BUTTON_UNINSTALL); 273 ExtensionStorageMonitor::BUTTON_UNINSTALL);
273 observer.WaitForExtensionUninstalled(); 274 observer.WaitForExtensionUninstalled();
274 } 275 }
275 276
276 } // namespace extensions 277 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_message_bubble_controller.cc ('k') | chrome/browser/extensions/extension_tab_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698