OLD | NEW |
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/extensions/extension_settings_storage_unittest.h" | 5 #include "chrome/browser/extensions/extension_settings_storage_unittest.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 | 10 |
| 11 using content::BrowserThread; |
| 12 |
11 namespace { | 13 namespace { |
12 | 14 |
13 // Gets the pretty-printed JSON for a value. | 15 // Gets the pretty-printed JSON for a value. |
14 std::string GetJSON(const Value& value) { | 16 std::string GetJSON(const Value& value) { |
15 std::string json; | 17 std::string json; |
16 base::JSONWriter::Write(&value, true, &json); | 18 base::JSONWriter::Write(&value, true, &json); |
17 return json; | 19 return json; |
18 } | 20 } |
19 | 21 |
20 // Pretty-prints a set of strings. | 22 // Pretty-prints a set of strings. |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 complex_changed_dict.Set(key3_, val3_->DeepCopy()); | 487 complex_changed_dict.Set(key3_, val3_->DeepCopy()); |
486 complex_changed_dict.Set("qwerty", val3_->DeepCopy()); | 488 complex_changed_dict.Set("qwerty", val3_->DeepCopy()); |
487 complex_set.clear(); | 489 complex_set.clear(); |
488 complex_set.insert(key3_); | 490 complex_set.insert(key3_); |
489 complex_set.insert("qwerty"); | 491 complex_set.insert("qwerty"); |
490 EXPECT_PRED_FORMAT4(SettingsEq, | 492 EXPECT_PRED_FORMAT4(SettingsEq, |
491 NULL, &complex_changed_dict, &complex_set, storage_->Clear()); | 493 NULL, &complex_changed_dict, &complex_set, storage_->Clear()); |
492 EXPECT_PRED_FORMAT4(SettingsEq, | 494 EXPECT_PRED_FORMAT4(SettingsEq, |
493 NULL, empty_dict_.get(), &empty_set_, storage_->Clear()); | 495 NULL, empty_dict_.get(), &empty_set_, storage_->Clear()); |
494 } | 496 } |
OLD | NEW |