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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller_unittest.mm

Issue 1813623002: Prevent the "Stop using an invalid certificate" button from showing up on about:blank for OSX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test. Created 4 years, 9 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/cocoa/website_settings/website_settings_bubble_controller.mm ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro ller.h" 5 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro ller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 info.identity_status = WebsiteSettings::SITE_IDENTITY_STATUS_UNKNOWN; 253 info.identity_status = WebsiteSettings::SITE_IDENTITY_STATUS_UNKNOWN;
254 254
255 CreateBubble(); 255 CreateBubble();
256 256
257 // Set identity info, specifying that the button should not be shown. 257 // Set identity info, specifying that the button should not be shown.
258 info.show_ssl_decision_revoke_button = false; 258 info.show_ssl_decision_revoke_button = false;
259 bridge_->SetIdentityInfo(const_cast<WebsiteSettingsUI::IdentityInfo&>(info)); 259 bridge_->SetIdentityInfo(const_cast<WebsiteSettingsUI::IdentityInfo&>(info));
260 EXPECT_EQ([controller_ resetDecisionsButton], nil); 260 EXPECT_EQ([controller_ resetDecisionsButton], nil);
261 261
262 // Set identity info, specifying that the button should be shown. 262 // Set identity info, specifying that the button should be shown.
263 info.cert_id = 1;
263 info.show_ssl_decision_revoke_button = true; 264 info.show_ssl_decision_revoke_button = true;
264 bridge_->SetIdentityInfo(const_cast<WebsiteSettingsUI::IdentityInfo&>(info)); 265 bridge_->SetIdentityInfo(const_cast<WebsiteSettingsUI::IdentityInfo&>(info));
265 EXPECT_NE([controller_ resetDecisionsButton], nil); 266 EXPECT_NE([controller_ resetDecisionsButton], nil);
266 267
267 // Check that clicking the button calls the right selector. 268 // Check that clicking the button calls the right selector.
268 EXPECT_EQ([[controller_ resetDecisionsButton] action], 269 EXPECT_EQ([[controller_ resetDecisionsButton] action],
269 @selector(resetCertificateDecisions:)); 270 @selector(resetCertificateDecisions:));
270 271
271 // Since the bubble is only created once per identity, we only need to check 272 // Since the bubble is only created once per identity, we only need to check
272 // the button is *added* when needed. So we don't check that it's removed 273 // the button is *added* when needed. So we don't check that it's removed
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 344 }
344 if ([view isKindOfClass:[NSPopUpButton class]]) { 345 if ([view isKindOfClass:[NSPopUpButton class]]) {
345 NSPopUpButton* button = static_cast<NSPopUpButton*>(view); 346 NSPopUpButton* button = static_cast<NSPopUpButton*>(view);
346 EXPECT_LT(NSMaxX([button frame]), window_width); 347 EXPECT_LT(NSMaxX([button frame]), window_width);
347 } 348 }
348 } 349 }
349 } 350 }
350 } 351 }
351 352
352 } // namespace 353 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698