OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 *was_locked = test->IsLocked(); | 47 *was_locked = test->IsLocked(); |
48 } | 48 } |
49 MessageQueueTest* test; | 49 MessageQueueTest* test; |
50 bool* was_locked; | 50 bool* was_locked; |
51 bool* deleted; | 51 bool* deleted; |
52 }; | 52 }; |
53 | 53 |
54 static void DelayedPostsWithIdenticalTimesAreProcessedInFifoOrder( | 54 static void DelayedPostsWithIdenticalTimesAreProcessedInFifoOrder( |
55 MessageQueue* q) { | 55 MessageQueue* q) { |
56 EXPECT_TRUE(q != NULL); | 56 EXPECT_TRUE(q != NULL); |
57 TimeStamp now = Time(); | 57 int64_t now = TimeMillis(); |
58 q->PostAt(now, NULL, 3); | 58 q->PostAt(now, NULL, 3); |
59 q->PostAt(now - 2, NULL, 0); | 59 q->PostAt(now - 2, NULL, 0); |
60 q->PostAt(now - 1, NULL, 1); | 60 q->PostAt(now - 1, NULL, 1); |
61 q->PostAt(now, NULL, 4); | 61 q->PostAt(now, NULL, 4); |
62 q->PostAt(now - 1, NULL, 2); | 62 q->PostAt(now - 1, NULL, 2); |
63 | 63 |
64 Message msg; | 64 Message msg; |
65 for (size_t i=0; i<5; ++i) { | 65 for (size_t i=0; i<5; ++i) { |
66 memset(&msg, 0, sizeof(msg)); | 66 memset(&msg, 0, sizeof(msg)); |
67 EXPECT_TRUE(q->Get(&msg, 0)); | 67 EXPECT_TRUE(q->Get(&msg, 0)); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 << "MessageQueueManager was already initialized by some " | 133 << "MessageQueueManager was already initialized by some " |
134 << "other test in this run."; | 134 << "other test in this run."; |
135 return; | 135 return; |
136 } | 136 } |
137 bool deleted = false; | 137 bool deleted = false; |
138 DeletedMessageHandler* handler = new DeletedMessageHandler(&deleted); | 138 DeletedMessageHandler* handler = new DeletedMessageHandler(&deleted); |
139 delete handler; | 139 delete handler; |
140 EXPECT_TRUE(deleted); | 140 EXPECT_TRUE(deleted); |
141 EXPECT_FALSE(MessageQueueManager::IsInitialized()); | 141 EXPECT_FALSE(MessageQueueManager::IsInitialized()); |
142 } | 142 } |
OLD | NEW |