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

Side by Side Diff: content/public/test/test_notification_tracker.h

Issue 18006003: Consistently use notifications from component updater w/ on-demand PNaCl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup test a bit Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
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 #ifndef CONTENT_PUBLIC_TEST_TEST_NOTIFICATION_TRACKER_H_ 5 #ifndef CONTENT_PUBLIC_TEST_TEST_NOTIFICATION_TRACKER_H_
6 #define CONTENT_PUBLIC_TEST_TEST_NOTIFICATION_TRACKER_H_ 6 #define CONTENT_PUBLIC_TEST_TEST_NOTIFICATION_TRACKER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 25 matching lines...) Expand all
36 virtual ~TestNotificationTracker(); 36 virtual ~TestNotificationTracker();
37 37
38 // Makes this object listen for the given notification with the given source. 38 // Makes this object listen for the given notification with the given source.
39 void ListenFor(int type, const NotificationSource& source); 39 void ListenFor(int type, const NotificationSource& source);
40 40
41 // Makes this object listen for notifications of the given type coming from 41 // Makes this object listen for notifications of the given type coming from
42 // any source. 42 // any source.
43 void ListenForAll(int type); 43 void ListenForAll(int type);
44 44
45 // Clears the list of events. 45 // Clears the list of events.
46 void Reset(); 46 virtual void Reset();
47 47
cpu_(ooo_6.6-7.5) 2013/07/01 18:30:22 if we need virtual here, I expect to see some code
jvoung (off chromium) 2013/07/02 01:04:26 Is line 107 of: https://codereview.chromium.org/1
48 // Given notifications type(sp, returns true if the list of notifications 48 // Given notifications type(sp, returns true if the list of notifications
49 // were exactly those listed in the given arg(s), and in the same order. 49 // were exactly those listed in the given arg(s), and in the same order.
50 // 50 //
51 // This will also reset the list so that the next call will only check for 51 // This will also reset the list so that the next call will only check for
52 // new notifications. Example: 52 // new notifications. Example:
53 // <do stuff> 53 // <do stuff>
54 // Check1AndReset(NOTIFY_A); 54 // Check1AndReset(NOTIFY_A);
55 // <do stuff> 55 // <do stuff>
56 // Check2AndReset(NOTIFY_B, NOTIFY_C) 56 // Check2AndReset(NOTIFY_B, NOTIFY_C)
57 bool Check1AndReset(int type); 57 bool Check1AndReset(int type);
(...skipping 19 matching lines...) Expand all
77 77
78 // Lists all received since last cleared, in the order they were received. 78 // Lists all received since last cleared, in the order they were received.
79 std::vector<Event> events_; 79 std::vector<Event> events_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(TestNotificationTracker); 81 DISALLOW_COPY_AND_ASSIGN(TestNotificationTracker);
82 }; 82 };
83 83
84 } // namespace content 84 } // namespace content
85 85
86 #endif // CONTENT_PUBLIC_TEST_TEST_NOTIFICATION_TRACKER_H_ 86 #endif // CONTENT_PUBLIC_TEST_TEST_NOTIFICATION_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698