OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/media/media_internals.h" | 5 #include "content/browser/media/media_internals.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "content/public/test/test_browser_thread.h" | 10 #include "content/public/test/test_browser_thread.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 base::DictionaryValue* data() { | 34 base::DictionaryValue* data() { |
35 return &internals_->data_; | 35 return &internals_->data_; |
36 } | 36 } |
37 | 37 |
38 void DeleteItem(const std::string& item) { | 38 void DeleteItem(const std::string& item) { |
39 internals_->DeleteItem(item); | 39 internals_->DeleteItem(item); |
40 } | 40 } |
41 | 41 |
42 void UpdateItem(const std::string& item, const std::string& property, | 42 void UpdateItem(const std::string& item, const std::string& property, |
43 base::Value* value) { | 43 base::Value* value) { |
44 internals_->UpdateItem("", item, property, value); | 44 internals_->UpdateItem(std::string(), item, property, value); |
45 } | 45 } |
46 | 46 |
47 void SendUpdate(const std::string& function, base::Value* value) { | 47 void SendUpdate(const std::string& function, base::Value* value) { |
48 internals_->SendUpdate(function, value); | 48 internals_->SendUpdate(function, value); |
49 } | 49 } |
50 | 50 |
51 protected: | 51 protected: |
52 virtual void SetUp() { | 52 virtual void SetUp() { |
53 internals_.reset(new MediaInternals()); | 53 internals_.reset(new MediaInternals()); |
54 } | 54 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 DeleteItem("some.item"); | 125 DeleteItem("some.item"); |
126 EXPECT_FALSE(data()->Get("some.item", &out)); | 126 EXPECT_FALSE(data()->Get("some.item", &out)); |
127 EXPECT_TRUE(data()->Get("some", &out)); | 127 EXPECT_TRUE(data()->Get("some", &out)); |
128 | 128 |
129 DeleteItem("some"); | 129 DeleteItem("some"); |
130 EXPECT_FALSE(data()->Get("some.item", &out)); | 130 EXPECT_FALSE(data()->Get("some.item", &out)); |
131 EXPECT_FALSE(data()->Get("some", &out)); | 131 EXPECT_FALSE(data()->Get("some", &out)); |
132 } | 132 } |
133 | 133 |
134 } // namespace content | 134 } // namespace content |
OLD | NEW |