OLD | NEW |
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 "components/copresence/handlers/audio/audio_directive_list.h" | 5 #include "components/copresence/handlers/audio/audio_directive_list.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
9 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
11 | 13 |
12 using testing::IsNull; | 14 using testing::IsNull; |
13 | 15 |
14 namespace copresence { | 16 namespace copresence { |
15 | 17 |
16 static const int64 kTtl = 10; | 18 static const int64_t kTtl = 10; |
17 | 19 |
18 const Directive CreateDirective(int64 ttl) { | 20 const Directive CreateDirective(int64_t ttl) { |
19 Directive directive; | 21 Directive directive; |
20 directive.set_ttl_millis(ttl); | 22 directive.set_ttl_millis(ttl); |
21 return directive; | 23 return directive; |
22 } | 24 } |
23 | 25 |
24 class AudioDirectiveListTest : public testing::Test { | 26 class AudioDirectiveListTest : public testing::Test { |
25 public: | 27 public: |
26 AudioDirectiveListTest() : directive_list_(new AudioDirectiveList) {} | 28 AudioDirectiveListTest() : directive_list_(new AudioDirectiveList) {} |
27 | 29 |
28 protected: | 30 protected: |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 directive_list_->RemoveDirective("op_id3"); | 75 directive_list_->RemoveDirective("op_id3"); |
74 directive_list_->RemoveDirective("op_id3"); | 76 directive_list_->RemoveDirective("op_id3"); |
75 EXPECT_EQ("op_id2", directive_list_->GetActiveDirective()->op_id); | 77 EXPECT_EQ("op_id2", directive_list_->GetActiveDirective()->op_id); |
76 directive_list_->RemoveDirective("op_id2"); | 78 directive_list_->RemoveDirective("op_id2"); |
77 EXPECT_EQ("op_id1", directive_list_->GetActiveDirective()->op_id); | 79 EXPECT_EQ("op_id1", directive_list_->GetActiveDirective()->op_id); |
78 directive_list_->RemoveDirective("op_id1"); | 80 directive_list_->RemoveDirective("op_id1"); |
79 EXPECT_THAT(directive_list_->GetActiveDirective(), IsNull()); | 81 EXPECT_THAT(directive_list_->GetActiveDirective(), IsNull()); |
80 } | 82 } |
81 | 83 |
82 } // namespace copresence | 84 } // namespace copresence |
OLD | NEW |