OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/host_content_settings_map.h" | 5 #include "chrome/browser/host_content_settings_map.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/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "chrome/browser/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
12 #include "chrome/common/notification_registrar.h" | 12 #include "chrome/common/notification_registrar.h" |
13 #include "chrome/common/notification_service.h" | 13 #include "chrome/common/notification_service.h" |
14 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
15 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
16 #include "chrome/test/testing_profile.h" | 16 #include "chrome/test/testing_profile.h" |
17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 | 20 |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 | 615 |
616 content_setting_prefs = | 616 content_setting_prefs = |
617 profile.GetPrefs()->GetDictionary(prefs::kContentSettingsPatterns); | 617 profile.GetPrefs()->GetDictionary(prefs::kContentSettingsPatterns); |
618 base::JSONWriter::Write(content_setting_prefs, false, &prefs_as_json); | 618 base::JSONWriter::Write(content_setting_prefs, false, &prefs_as_json); |
619 EXPECT_STREQ("{\"[*.]example.com\":{\"per_plugin\":{\"otherplugin\":2}}}", | 619 EXPECT_STREQ("{\"[*.]example.com\":{\"per_plugin\":{\"otherplugin\":2}}}", |
620 prefs_as_json.c_str()); | 620 prefs_as_json.c_str()); |
621 *CommandLine::ForCurrentProcess() = cl; | 621 *CommandLine::ForCurrentProcess() = cl; |
622 } | 622 } |
623 | 623 |
624 } // namespace | 624 } // namespace |
OLD | NEW |