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 "chrome/browser/media/media_internals.h" | 5 #include "chrome/browser/media/media_internals.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "chrome/browser/media/media_internals_observer.h" | 9 #include "chrome/browser/media/media_internals_observer.h" |
10 #include "content/test/test_browser_thread.h" | 10 #include "content/public/test/test_browser_thread.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 class MockMediaInternalsObserver : public MediaInternalsObserver { | 14 class MockMediaInternalsObserver : public MediaInternalsObserver { |
15 public: | 15 public: |
16 MOCK_METHOD1(OnUpdate, void(const string16& javascript)); | 16 MOCK_METHOD1(OnUpdate, void(const string16& javascript)); |
17 }; | 17 }; |
18 | 18 |
19 class MediaInternalsTest : public testing::Test { | 19 class MediaInternalsTest : public testing::Test { |
20 public: | 20 public: |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 EXPECT_TRUE(data()->Get("some", &out)); | 105 EXPECT_TRUE(data()->Get("some", &out)); |
106 | 106 |
107 DeleteItem("some.item"); | 107 DeleteItem("some.item"); |
108 EXPECT_FALSE(data()->Get("some.item", &out)); | 108 EXPECT_FALSE(data()->Get("some.item", &out)); |
109 EXPECT_TRUE(data()->Get("some", &out)); | 109 EXPECT_TRUE(data()->Get("some", &out)); |
110 | 110 |
111 DeleteItem("some"); | 111 DeleteItem("some"); |
112 EXPECT_FALSE(data()->Get("some.item", &out)); | 112 EXPECT_FALSE(data()->Get("some.item", &out)); |
113 EXPECT_FALSE(data()->Get("some", &out)); | 113 EXPECT_FALSE(data()->Get("some", &out)); |
114 } | 114 } |
OLD | NEW |