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

Side by Side Diff: chrome/test/chromedriver/chrome_launcher_unittest.cc

Issue 1310173010: Remove use of JSONReader::DeprecatedRead from chrome/test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 5 years, 2 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/base64.h" 5 #include "base/base64.h"
6 #include "base/base_paths.h" 6 #include "base/base_paths.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 scoped_ptr<base::Value> prefs_value = base::JSONReader::Read(prefs_str); 184 scoped_ptr<base::Value> prefs_value = base::JSONReader::Read(prefs_str);
185 const base::DictionaryValue* prefs_dict = NULL; 185 const base::DictionaryValue* prefs_dict = NULL;
186 ASSERT_TRUE(prefs_value->GetAsDictionary(&prefs_dict)); 186 ASSERT_TRUE(prefs_value->GetAsDictionary(&prefs_dict));
187 AssertEQ(*prefs_dict, "myPrefsKey", "ok"); 187 AssertEQ(*prefs_dict, "myPrefsKey", "ok");
188 AssertEQ(*prefs_dict, "pref.sub", "1"); 188 AssertEQ(*prefs_dict, "pref.sub", "1");
189 189
190 base::FilePath local_state_file = 190 base::FilePath local_state_file =
191 temp_dir.path().Append(chrome::kLocalStateFilename); 191 temp_dir.path().Append(chrome::kLocalStateFilename);
192 std::string local_state_str; 192 std::string local_state_str;
193 ASSERT_TRUE(base::ReadFileToString(local_state_file, &local_state_str)); 193 ASSERT_TRUE(base::ReadFileToString(local_state_file, &local_state_str));
194 scoped_ptr<base::Value> local_state_value( 194 scoped_ptr<base::Value> local_state_value =
195 base::JSONReader::DeprecatedRead(local_state_str)); 195 base::JSONReader::Read(local_state_str);
196 const base::DictionaryValue* local_state_dict = NULL; 196 const base::DictionaryValue* local_state_dict = NULL;
197 ASSERT_TRUE(local_state_value->GetAsDictionary(&local_state_dict)); 197 ASSERT_TRUE(local_state_value->GetAsDictionary(&local_state_dict));
198 AssertEQ(*local_state_dict, "myLocalKey", "ok"); 198 AssertEQ(*local_state_dict, "myLocalKey", "ok");
199 AssertEQ(*local_state_dict, "local.state.sub", "2"); 199 AssertEQ(*local_state_dict, "local.state.sub", "2");
200 } 200 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome_launcher.cc ('k') | chrome/test/chromedriver/performance_logger_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698