| OLD | NEW |
| 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 "chrome/browser/ui/website_settings/website_settings.h" | 5 #include "chrome/browser/ui/website_settings/website_settings.h" |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 return TabSpecificContentSettings::FromWebContents(web_contents()); | 126 return TabSpecificContentSettings::FromWebContents(web_contents()); |
| 127 } | 127 } |
| 128 InfoBarService* infobar_service() { | 128 InfoBarService* infobar_service() { |
| 129 return InfoBarService::FromWebContents(web_contents()); | 129 return InfoBarService::FromWebContents(web_contents()); |
| 130 } | 130 } |
| 131 | 131 |
| 132 WebsiteSettings* website_settings() { | 132 WebsiteSettings* website_settings() { |
| 133 if (!website_settings_.get()) { | 133 if (!website_settings_.get()) { |
| 134 website_settings_.reset(new WebsiteSettings( | 134 website_settings_.reset(new WebsiteSettings( |
| 135 mock_ui(), profile(), tab_specific_content_settings(), | 135 mock_ui(), profile(), tab_specific_content_settings(), |
| 136 infobar_service(), url(), ssl(), cert_store())); | 136 web_contents(), url(), ssl(), cert_store())); |
| 137 } | 137 } |
| 138 return website_settings_.get(); | 138 return website_settings_.get(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 SSLStatus ssl_; | 141 SSLStatus ssl_; |
| 142 | 142 |
| 143 private: | 143 private: |
| 144 scoped_ptr<WebsiteSettings> website_settings_; | 144 scoped_ptr<WebsiteSettings> website_settings_; |
| 145 scoped_ptr<MockWebsiteSettingsUI> mock_ui_; | 145 scoped_ptr<MockWebsiteSettingsUI> mock_ui_; |
| 146 int cert_id_; | 146 int cert_id_; |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 450 |
| 451 TEST_F(WebsiteSettingsTest, InternalPage) { | 451 TEST_F(WebsiteSettingsTest, InternalPage) { |
| 452 SetURL("chrome://bookmarks"); | 452 SetURL("chrome://bookmarks"); |
| 453 SetDefaultUIExpectations(mock_ui()); | 453 SetDefaultUIExpectations(mock_ui()); |
| 454 EXPECT_EQ(WebsiteSettings::SITE_CONNECTION_STATUS_INTERNAL_PAGE, | 454 EXPECT_EQ(WebsiteSettings::SITE_CONNECTION_STATUS_INTERNAL_PAGE, |
| 455 website_settings()->site_connection_status()); | 455 website_settings()->site_connection_status()); |
| 456 EXPECT_EQ(WebsiteSettings::SITE_IDENTITY_STATUS_INTERNAL_PAGE, | 456 EXPECT_EQ(WebsiteSettings::SITE_IDENTITY_STATUS_INTERNAL_PAGE, |
| 457 website_settings()->site_identity_status()); | 457 website_settings()->site_identity_status()); |
| 458 EXPECT_EQ(base::string16(), website_settings()->organization_name()); | 458 EXPECT_EQ(base::string16(), website_settings()->organization_name()); |
| 459 } | 459 } |
| OLD | NEW |