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

Side by Side Diff: chrome/browser/upgrade_detector_impl_unittest.cc

Issue 1545223002: Switch to standard integer types in chrome/browser/, part 4 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 12 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 "chrome/browser/upgrade_detector_impl.h" 5 #include "chrome/browser/upgrade_detector_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/macros.h"
9 #include "content/public/browser/notification_details.h" 10 #include "content/public/browser/notification_details.h"
10 #include "content/public/browser/notification_observer.h" 11 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h" 12 #include "content/public/browser/notification_registrar.h"
12 #include "content/public/browser/notification_service.h" 13 #include "content/public/browser/notification_service.h"
13 #include "content/public/test/test_browser_thread_bundle.h" 14 #include "content/public/test/test_browser_thread_bundle.h"
14 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
15 16
16 class TestUpgradeDetectorImpl : public UpgradeDetectorImpl { 17 class TestUpgradeDetectorImpl : public UpgradeDetectorImpl {
17 public: 18 public:
18 TestUpgradeDetectorImpl() : trigger_critical_update_call_count_(0) {} 19 TestUpgradeDetectorImpl() : trigger_critical_update_call_count_(0) {}
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 EXPECT_FALSE(detector.notify_upgrade()); 103 EXPECT_FALSE(detector.notify_upgrade());
103 EXPECT_TRUE(notifications_listener.notifications_received().empty()); 104 EXPECT_TRUE(notifications_listener.notifications_received().empty());
104 105
105 detector.NotifyOnUpgradeWithTimePassed(base::TimeDelta::FromDays(30)); 106 detector.NotifyOnUpgradeWithTimePassed(base::TimeDelta::FromDays(30));
106 EXPECT_TRUE(detector.notify_upgrade()); 107 EXPECT_TRUE(detector.notify_upgrade());
107 ASSERT_EQ(1U, notifications_listener.notifications_received().size()); 108 ASSERT_EQ(1U, notifications_listener.notifications_received().size());
108 EXPECT_EQ(chrome::NOTIFICATION_UPGRADE_RECOMMENDED, 109 EXPECT_EQ(chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
109 notifications_listener.notifications_received().front()); 110 notifications_listener.notifications_received().front());
110 EXPECT_EQ(1, detector.trigger_critical_update_call_count()); 111 EXPECT_EQ(1, detector.trigger_critical_update_call_count());
111 } 112 }
OLDNEW
« no previous file with comments | « chrome/browser/upgrade_detector_impl.cc ('k') | chrome/browser/usb/usb_chooser_bubble_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698