OLD | NEW |
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/file_util.h" | |
9 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/common/chrome_constants.h" | 16 #include "chrome/common/chrome_constants.h" |
17 #include "chrome/test/chromedriver/chrome/status.h" | 17 #include "chrome/test/chromedriver/chrome/status.h" |
18 #include "chrome/test/chromedriver/chrome_launcher.h" | 18 #include "chrome/test/chromedriver/chrome_launcher.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 temp_dir.path().Append(chrome::kLocalStateFilename); | 190 temp_dir.path().Append(chrome::kLocalStateFilename); |
191 std::string local_state_str; | 191 std::string local_state_str; |
192 ASSERT_TRUE(base::ReadFileToString(local_state_file, &local_state_str)); | 192 ASSERT_TRUE(base::ReadFileToString(local_state_file, &local_state_str)); |
193 scoped_ptr<base::Value> local_state_value( | 193 scoped_ptr<base::Value> local_state_value( |
194 base::JSONReader::Read(local_state_str)); | 194 base::JSONReader::Read(local_state_str)); |
195 const base::DictionaryValue* local_state_dict = NULL; | 195 const base::DictionaryValue* local_state_dict = NULL; |
196 ASSERT_TRUE(local_state_value->GetAsDictionary(&local_state_dict)); | 196 ASSERT_TRUE(local_state_value->GetAsDictionary(&local_state_dict)); |
197 AssertEQ(*local_state_dict, "myLocalKey", "ok"); | 197 AssertEQ(*local_state_dict, "myLocalKey", "ok"); |
198 AssertEQ(*local_state_dict, "local.state.sub", "2"); | 198 AssertEQ(*local_state_dict, "local.state.sub", "2"); |
199 } | 199 } |
OLD | NEW |