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

Side by Side Diff: content/browser/webrtc/webrtc_getusermedia_browsertest.cc

Issue 2740143002: Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Comment Updates Created 3 years, 9 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
OLDNEW
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 EXPECT_EQ(value->GetType(), base::Value::Type::LIST); 238 EXPECT_EQ(value->GetType(), base::Value::Type::LIST);
239 239
240 base::ListValue* values; 240 base::ListValue* values;
241 ASSERT_TRUE(value->GetAsList(&values)); 241 ASSERT_TRUE(value->GetAsList(&values));
242 242
243 for (base::ListValue::iterator it = values->begin(); 243 for (base::ListValue::iterator it = values->begin();
244 it != values->end(); ++it) { 244 it != values->end(); ++it) {
245 const base::DictionaryValue* dict; 245 const base::DictionaryValue* dict;
246 std::string kind; 246 std::string kind;
247 std::string device_id; 247 std::string device_id;
248 ASSERT_TRUE((*it)->GetAsDictionary(&dict)); 248 ASSERT_TRUE(it->GetAsDictionary(&dict));
249 ASSERT_TRUE(dict->GetString("kind", &kind)); 249 ASSERT_TRUE(dict->GetString("kind", &kind));
250 ASSERT_TRUE(dict->GetString("id", &device_id)); 250 ASSERT_TRUE(dict->GetString("id", &device_id));
251 ASSERT_FALSE(device_id.empty()); 251 ASSERT_FALSE(device_id.empty());
252 EXPECT_TRUE(kind == "audio" || kind == "video"); 252 EXPECT_TRUE(kind == "audio" || kind == "video");
253 if (kind == "audio") { 253 if (kind == "audio") {
254 audio_ids->push_back(device_id); 254 audio_ids->push_back(device_id);
255 } else if (kind == "video") { 255 } else if (kind == "video") {
256 video_ids->push_back(device_id); 256 video_ids->push_back(device_id);
257 } 257 }
258 } 258 }
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 base::Bind(&VerifyDisableLocalEcho, true)); 779 base::Bind(&VerifyDisableLocalEcho, true));
780 call = GenerateGetUserMediaWithDisableLocalEcho( 780 call = GenerateGetUserMediaWithDisableLocalEcho(
781 "getUserMediaAndExpectSuccess", "true"); 781 "getUserMediaAndExpectSuccess", "true");
782 ExecuteJavascriptAndWaitForOk(call); 782 ExecuteJavascriptAndWaitForOk(call);
783 783
784 manager->SetGenerateStreamCallbackForTesting( 784 manager->SetGenerateStreamCallbackForTesting(
785 MediaStreamManager::GenerateStreamTestCallback()); 785 MediaStreamManager::GenerateStreamTestCallback());
786 } 786 }
787 787
788 } // namespace content 788 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698