Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: chrome/browser/media/media_internals_unittest.cc

Issue 10823097: Part 2: Plumb render view ID to content::MediaObserver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/public/test/test_browser_thread.h" 10 #include "content/public/test/test_browser_thread.h"
(...skipping 11 matching lines...) Expand all
22 DictionaryValue* data() { 22 DictionaryValue* data() {
23 return &internals_->data_; 23 return &internals_->data_;
24 } 24 }
25 25
26 void DeleteItem(const std::string& item) { 26 void DeleteItem(const std::string& item) {
27 internals_->DeleteItem(item); 27 internals_->DeleteItem(item);
28 } 28 }
29 29
30 void UpdateItem(const std::string& item, const std::string& property, 30 void UpdateItem(const std::string& item, const std::string& property,
31 Value* value) { 31 Value* value) {
32 internals_->UpdateItem("", item, property, value); 32 internals_->UpdateItem("", 0, 0, item, property, value);
33 } 33 }
34 34
35 void SendUpdate(const std::string& function, Value* value) { 35 void SendUpdate(const std::string& function, Value* value) {
36 internals_->SendUpdate(function, value); 36 internals_->SendUpdate(function, value);
37 } 37 }
38 38
39 protected: 39 protected:
40 virtual void SetUp() { 40 virtual void SetUp() {
41 internals_.reset(new MediaInternals()); 41 internals_.reset(new MediaInternals());
42 } 42 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « chrome/browser/media/media_internals.cc ('k') | chrome/browser/resources/media_internals/media_internals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698