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

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: Rebase onto master. 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 bb2f99d4ff142728fc30b77e97471a9925d13bc0..3d6276a3a38bfa6ddc867ed665d2ed325be4d9d9 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;
}
@@ -168,7 +168,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.
@@ -180,7 +181,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());
@@ -197,8 +199,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());
@@ -221,7 +224,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"));
@@ -240,7 +244,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());
« no previous file with comments | « chrome/browser/chromeos/extensions/file_browser_notifications.cc ('k') | chrome/browser/chromeos/external_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698