| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 *was_locked = test->IsLocked(); | 46 *was_locked = test->IsLocked(); |
| 47 } | 47 } |
| 48 MessageQueueTest* test; | 48 MessageQueueTest* test; |
| 49 bool* was_locked; | 49 bool* was_locked; |
| 50 bool* deleted; | 50 bool* deleted; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 static void DelayedPostsWithIdenticalTimesAreProcessedInFifoOrder( | 53 static void DelayedPostsWithIdenticalTimesAreProcessedInFifoOrder( |
| 54 MessageQueue* q) { | 54 MessageQueue* q) { |
| 55 EXPECT_TRUE(q != NULL); | 55 EXPECT_TRUE(q != NULL); |
| 56 TimeStamp now = Time(); | 56 int64_t now = Time(); |
| 57 q->PostAt(now, NULL, 3); | 57 q->PostAt(now, NULL, 3); |
| 58 q->PostAt(now - 2, NULL, 0); | 58 q->PostAt(now - 2, NULL, 0); |
| 59 q->PostAt(now - 1, NULL, 1); | 59 q->PostAt(now - 1, NULL, 1); |
| 60 q->PostAt(now, NULL, 4); | 60 q->PostAt(now, NULL, 4); |
| 61 q->PostAt(now - 1, NULL, 2); | 61 q->PostAt(now - 1, NULL, 2); |
| 62 | 62 |
| 63 Message msg; | 63 Message msg; |
| 64 for (size_t i=0; i<5; ++i) { | 64 for (size_t i=0; i<5; ++i) { |
| 65 memset(&msg, 0, sizeof(msg)); | 65 memset(&msg, 0, sizeof(msg)); |
| 66 EXPECT_TRUE(q->Get(&msg, 0)); | 66 EXPECT_TRUE(q->Get(&msg, 0)); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 << "MessageQueueManager was already initialized by some " | 131 << "MessageQueueManager was already initialized by some " |
| 132 << "other test in this run."; | 132 << "other test in this run."; |
| 133 return; | 133 return; |
| 134 } | 134 } |
| 135 bool deleted = false; | 135 bool deleted = false; |
| 136 DeletedMessageHandler* handler = new DeletedMessageHandler(&deleted); | 136 DeletedMessageHandler* handler = new DeletedMessageHandler(&deleted); |
| 137 delete handler; | 137 delete handler; |
| 138 EXPECT_TRUE(deleted); | 138 EXPECT_TRUE(deleted); |
| 139 EXPECT_FALSE(MessageQueueManager::IsInitialized()); | 139 EXPECT_FALSE(MessageQueueManager::IsInitialized()); |
| 140 } | 140 } |
| OLD | NEW |