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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings_unittest.cc

Issue 1317443002: Fix UAF in Origin Info Bubble and permission settings UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix another Andorid call site. Checked all call sites. Created 5 years, 3 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
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings_ui.h ('k') | no next file » | 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 "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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698