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 <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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 "getSources()"); | 227 "getSources()"); |
228 EXPECT_FALSE(devices_as_json.empty()); | 228 EXPECT_FALSE(devices_as_json.empty()); |
229 | 229 |
230 int error_code; | 230 int error_code; |
231 std::string error_message; | 231 std::string error_message; |
232 std::unique_ptr<base::Value> value = base::JSONReader::ReadAndReturnError( | 232 std::unique_ptr<base::Value> value = base::JSONReader::ReadAndReturnError( |
233 devices_as_json, base::JSON_ALLOW_TRAILING_COMMAS, &error_code, | 233 devices_as_json, base::JSON_ALLOW_TRAILING_COMMAS, &error_code, |
234 &error_message); | 234 &error_message); |
235 | 235 |
236 ASSERT_TRUE(value.get() != NULL) << error_message; | 236 ASSERT_TRUE(value.get() != NULL) << error_message; |
237 EXPECT_EQ(value->GetType(), base::Value::TYPE_LIST); | 237 EXPECT_EQ(value->GetType(), base::Value::Type::LIST); |
238 | 238 |
239 base::ListValue* values; | 239 base::ListValue* values; |
240 ASSERT_TRUE(value->GetAsList(&values)); | 240 ASSERT_TRUE(value->GetAsList(&values)); |
241 | 241 |
242 for (base::ListValue::iterator it = values->begin(); | 242 for (base::ListValue::iterator it = values->begin(); |
243 it != values->end(); ++it) { | 243 it != values->end(); ++it) { |
244 const base::DictionaryValue* dict; | 244 const base::DictionaryValue* dict; |
245 std::string kind; | 245 std::string kind; |
246 std::string device_id; | 246 std::string device_id; |
247 ASSERT_TRUE((*it)->GetAsDictionary(&dict)); | 247 ASSERT_TRUE((*it)->GetAsDictionary(&dict)); |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 base::Bind(&VerifyDisableLocalEcho, true)); | 757 base::Bind(&VerifyDisableLocalEcho, true)); |
758 call = GenerateGetUserMediaWithDisableLocalEcho( | 758 call = GenerateGetUserMediaWithDisableLocalEcho( |
759 "getUserMediaAndExpectSuccess", "true"); | 759 "getUserMediaAndExpectSuccess", "true"); |
760 ExecuteJavascriptAndWaitForOk(call); | 760 ExecuteJavascriptAndWaitForOk(call); |
761 | 761 |
762 manager->SetGenerateStreamCallbackForTesting( | 762 manager->SetGenerateStreamCallbackForTesting( |
763 MediaStreamManager::GenerateStreamTestCallback()); | 763 MediaStreamManager::GenerateStreamTestCallback()); |
764 } | 764 } |
765 | 765 |
766 } // namespace content | 766 } // namespace content |
OLD | NEW |