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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 240193003: Move Infobars core files to the Infobars component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nib name on mac Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/plugins/plugin_observer.cc ('k') | chrome/browser/ssl/ssl_tab_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 21 matching lines...) Expand all
32 #include "chrome/browser/chrome_notification_types.h" 32 #include "chrome/browser/chrome_notification_types.h"
33 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 33 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
34 #include "chrome/browser/devtools/devtools_window.h" 34 #include "chrome/browser/devtools/devtools_window.h"
35 #include "chrome/browser/download/download_prefs.h" 35 #include "chrome/browser/download/download_prefs.h"
36 #include "chrome/browser/extensions/api/messaging/native_message_process_host.h" 36 #include "chrome/browser/extensions/api/messaging/native_message_process_host.h"
37 #include "chrome/browser/extensions/crx_installer.h" 37 #include "chrome/browser/extensions/crx_installer.h"
38 #include "chrome/browser/extensions/extension_service.h" 38 #include "chrome/browser/extensions/extension_service.h"
39 #include "chrome/browser/extensions/unpacked_installer.h" 39 #include "chrome/browser/extensions/unpacked_installer.h"
40 #include "chrome/browser/extensions/updater/extension_cache_fake.h" 40 #include "chrome/browser/extensions/updater/extension_cache_fake.h"
41 #include "chrome/browser/extensions/updater/extension_updater.h" 41 #include "chrome/browser/extensions/updater/extension_updater.h"
42 #include "chrome/browser/infobars/infobar.h"
43 #include "chrome/browser/infobars/infobar_service.h" 42 #include "chrome/browser/infobars/infobar_service.h"
44 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 43 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
45 #include "chrome/browser/media/media_stream_devices_controller.h" 44 #include "chrome/browser/media/media_stream_devices_controller.h"
46 #include "chrome/browser/metrics/variations/variations_service.h" 45 #include "chrome/browser/metrics/variations/variations_service.h"
47 #include "chrome/browser/net/url_request_mock_util.h" 46 #include "chrome/browser/net/url_request_mock_util.h"
48 #include "chrome/browser/plugins/plugin_prefs.h" 47 #include "chrome/browser/plugins/plugin_prefs.h"
49 #include "chrome/browser/policy/cloud/test_request_interceptor.h" 48 #include "chrome/browser/policy/cloud/test_request_interceptor.h"
50 #include "chrome/browser/policy/profile_policy_connector.h" 49 #include "chrome/browser/policy/profile_policy_connector.h"
51 #include "chrome/browser/policy/profile_policy_connector_factory.h" 50 #include "chrome/browser/policy/profile_policy_connector_factory.h"
52 #include "chrome/browser/prefs/session_startup_pref.h" 51 #include "chrome/browser/prefs/session_startup_pref.h"
(...skipping 21 matching lines...) Expand all
74 #include "chrome/common/chrome_paths.h" 73 #include "chrome/common/chrome_paths.h"
75 #include "chrome/common/chrome_switches.h" 74 #include "chrome/common/chrome_switches.h"
76 #include "chrome/common/content_settings.h" 75 #include "chrome/common/content_settings.h"
77 #include "chrome/common/content_settings_pattern.h" 76 #include "chrome/common/content_settings_pattern.h"
78 #include "chrome/common/extensions/extension_constants.h" 77 #include "chrome/common/extensions/extension_constants.h"
79 #include "chrome/common/pref_names.h" 78 #include "chrome/common/pref_names.h"
80 #include "chrome/common/url_constants.h" 79 #include "chrome/common/url_constants.h"
81 #include "chrome/test/base/in_process_browser_test.h" 80 #include "chrome/test/base/in_process_browser_test.h"
82 #include "chrome/test/base/test_switches.h" 81 #include "chrome/test/base/test_switches.h"
83 #include "chrome/test/base/ui_test_utils.h" 82 #include "chrome/test/base/ui_test_utils.h"
83 #include "components/infobars/core/infobar.h"
84 #include "components/policy/core/browser/browser_policy_connector.h" 84 #include "components/policy/core/browser/browser_policy_connector.h"
85 #include "components/policy/core/common/external_data_fetcher.h" 85 #include "components/policy/core/common/external_data_fetcher.h"
86 #include "components/policy/core/common/mock_configuration_policy_provider.h" 86 #include "components/policy/core/common/mock_configuration_policy_provider.h"
87 #include "components/policy/core/common/policy_map.h" 87 #include "components/policy/core/common/policy_map.h"
88 #include "components/policy/core/common/policy_pref_names.h" 88 #include "components/policy/core/common/policy_pref_names.h"
89 #include "components/policy/core/common/policy_service.h" 89 #include "components/policy/core/common/policy_service.h"
90 #include "components/policy/core/common/policy_service_impl.h" 90 #include "components/policy/core/common/policy_service_impl.h"
91 #include "content/public/browser/browser_child_process_host_iterator.h" 91 #include "content/public/browser/browser_child_process_host_iterator.h"
92 #include "content/public/browser/browser_context.h" 92 #include "content/public/browser/browser_context.h"
93 #include "content/public/browser/browser_thread.h" 93 #include "content/public/browser/browser_thread.h"
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 ASSERT_TRUE(translate_tab_helper); 1903 ASSERT_TRUE(translate_tab_helper);
1904 LanguageState& language_state = translate_tab_helper->GetLanguageState(); 1904 LanguageState& language_state = translate_tab_helper->GetLanguageState();
1905 EXPECT_EQ("fr", language_state.original_language()); 1905 EXPECT_EQ("fr", language_state.original_language());
1906 EXPECT_TRUE(language_state.page_needs_translation()); 1906 EXPECT_TRUE(language_state.page_needs_translation());
1907 EXPECT_FALSE(language_state.translation_pending()); 1907 EXPECT_FALSE(language_state.translation_pending());
1908 EXPECT_FALSE(language_state.translation_declined()); 1908 EXPECT_FALSE(language_state.translation_declined());
1909 EXPECT_FALSE(language_state.IsPageTranslated()); 1909 EXPECT_FALSE(language_state.IsPageTranslated());
1910 1910
1911 // Verify that the translate infobar showed up. 1911 // Verify that the translate infobar showed up.
1912 ASSERT_EQ(1u, infobar_service->infobar_count()); 1912 ASSERT_EQ(1u, infobar_service->infobar_count());
1913 InfoBar* infobar = infobar_service->infobar_at(0); 1913 infobars::InfoBar* infobar = infobar_service->infobar_at(0);
1914 TranslateInfoBarDelegate* translate_infobar_delegate = 1914 TranslateInfoBarDelegate* translate_infobar_delegate =
1915 infobar->delegate()->AsTranslateInfoBarDelegate(); 1915 infobar->delegate()->AsTranslateInfoBarDelegate();
1916 ASSERT_TRUE(translate_infobar_delegate); 1916 ASSERT_TRUE(translate_infobar_delegate);
1917 EXPECT_EQ(translate::TRANSLATE_STEP_BEFORE_TRANSLATE, 1917 EXPECT_EQ(translate::TRANSLATE_STEP_BEFORE_TRANSLATE,
1918 translate_infobar_delegate->translate_step()); 1918 translate_infobar_delegate->translate_step());
1919 EXPECT_EQ("fr", translate_infobar_delegate->original_language_code()); 1919 EXPECT_EQ("fr", translate_infobar_delegate->original_language_code());
1920 1920
1921 // Now force disable translate. 1921 // Now force disable translate.
1922 infobar_service->RemoveInfoBar(infobar); 1922 infobar_service->RemoveInfoBar(infobar);
1923 EXPECT_EQ(0u, infobar_service->infobar_count()); 1923 EXPECT_EQ(0u, infobar_service->infobar_count());
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
2971 PrefService* prefs = browser()->profile()->GetPrefs(); 2971 PrefService* prefs = browser()->profile()->GetPrefs();
2972 EXPECT_TRUE(extensions::NativeMessageProcessHost::IsHostAllowed( 2972 EXPECT_TRUE(extensions::NativeMessageProcessHost::IsHostAllowed(
2973 prefs, "host.name")); 2973 prefs, "host.name"));
2974 EXPECT_FALSE(extensions::NativeMessageProcessHost::IsHostAllowed( 2974 EXPECT_FALSE(extensions::NativeMessageProcessHost::IsHostAllowed(
2975 prefs, "other.host.name")); 2975 prefs, "other.host.name"));
2976 } 2976 }
2977 2977
2978 #endif // !defined(CHROME_OS) 2978 #endif // !defined(CHROME_OS)
2979 2979
2980 } // namespace policy 2980 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_observer.cc ('k') | chrome/browser/ssl/ssl_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698