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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_notifications_browsertest.cc

Issue 10026013: Update use of TimeDelta in chrome/browser/*, ui/views/*, and other places. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove debug comment. Created 8 years, 7 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/chromeos/extensions/file_browser_notifications_browsertest.cc
diff --git a/chrome/browser/chromeos/extensions/file_browser_notifications_browsertest.cc b/chrome/browser/chromeos/extensions/file_browser_notifications_browsertest.cc
index 3b41a46bc3ebbdf33297fbe6c0ce1ef4d50a429d..33c0b219ba9944a58c8ed5e86f8c9f6a21206459 100644
--- a/chrome/browser/chromeos/extensions/file_browser_notifications_browsertest.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_notifications_browsertest.cc
@@ -30,7 +30,7 @@ class MockFileBrowserNotifications : public FileBrowserNotifications {
const std::string& notification_id,
NotificationType type,
const string16& message,
- size_t delay_ms) OVERRIDE {
+ base::TimeDelta delay) OVERRIDE {
show_callback_data_.id = notification_id;
show_callback_data_.type = type;
show_callback_data_.message = message;
@@ -39,7 +39,7 @@ class MockFileBrowserNotifications : public FileBrowserNotifications {
// Records the notification so we can force it to hide later.
virtual void PostDelayedHideNotificationTask(NotificationType type,
const std::string path,
- size_t delay_ms) OVERRIDE {
+ base::TimeDelta delay) OVERRIDE {
hide_callback_data_.type = type;
hide_callback_data_.path = path;
}
@@ -164,7 +164,8 @@ IN_PROC_BROWSER_TEST_F(FileBrowserNotificationsTest, ShowDelayedTest) {
InitNotifications();
// Adding a delayed notification does not show a balloon.
notifications_->ShowNotificationDelayed(FileBrowserNotifications::DEVICE,
- "path", 3000);
+ "path",
+ base::TimeDelta::FromSeconds(3));
EXPECT_EQ(0u, collection_->GetActiveBalloons().size());
// Forcing the show to happen makes the balloon appear.
@@ -176,7 +177,8 @@ IN_PROC_BROWSER_TEST_F(FileBrowserNotificationsTest, ShowDelayedTest) {
// Showing a notification both immediately and delayed results in one
// additional balloon.
notifications_->ShowNotificationDelayed(FileBrowserNotifications::DEVICE_FAIL,
- "path", 3000);
+ "path",
+ base::TimeDelta::FromSeconds(3));
notifications_->ShowNotification(FileBrowserNotifications::DEVICE_FAIL,
"path");
EXPECT_EQ(2u, collection_->GetActiveBalloons().size());
@@ -193,8 +195,9 @@ IN_PROC_BROWSER_TEST_F(FileBrowserNotificationsTest, ShowDelayedTest) {
// If we schedule a show for later, then hide before it becomes visible,
// the balloon should not be added.
- notifications_->ShowNotificationDelayed(
- FileBrowserNotifications::FORMAT_FAIL, "path", 3000);
+ notifications_->ShowNotificationDelayed(FileBrowserNotifications::FORMAT_FAIL,
+ "path",
+ base::TimeDelta::FromSeconds(3));
notifications_->HideNotification(FileBrowserNotifications::FORMAT_FAIL,
"path");
EXPECT_EQ(2u, collection_->GetActiveBalloons().size());
@@ -217,7 +220,8 @@ IN_PROC_BROWSER_TEST_F(FileBrowserNotificationsTest, HideDelayedTest) {
// Showing now, and scheduling a hide for later, results in one balloon.
notifications_->ShowNotification(FileBrowserNotifications::DEVICE, "path");
notifications_->HideNotificationDelayed(FileBrowserNotifications::DEVICE,
- "path", 3000);
+ "path",
+ base::TimeDelta::FromSeconds(3));
EXPECT_EQ(1u, collection_->GetActiveBalloons().size());
EXPECT_TRUE(FindBalloon("Dpath"));
@@ -236,7 +240,8 @@ IN_PROC_BROWSER_TEST_F(FileBrowserNotificationsTest, HideDelayedTest) {
// Delayed hide for a notification that doesn't exist does nothing.
notifications_->HideNotificationDelayed(FileBrowserNotifications::DEVICE_FAIL,
- "path", 3000);
+ "path",
+ base::TimeDelta::FromSeconds(3));
notifications_->ExecuteHide();
ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(0u, collection_->GetActiveBalloons().size());

Powered by Google App Engine
This is Rietveld 408576698