New issue
Advanced search Search tips

Issue 733311 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug
Team-Security-UX

Blocking:
issue 721898


Show other hotlists

Hotlists containing this issue:
EnamelAndFriendsFixIt


Sign in to add a comment

Add test for HTTPBad Incognito warning on iOS

Project Member Reported by elawrence@chromium.org, Jun 14 2017

Issue description

https://codereview.chromium.org/2917873004/

> Also, we really ought to have an iOS test for this, but I can't remember how
to
> write such tests. I think it's okay to land as-is without adding one, but
maybe
> we can add a test as a follow-up. eugenebut@ can probably help with that.
iOS team would really appreciate the test, which should not be hard to write:

typedef web::WebTestWithWebController IOSSecurityStateTabHelperTest;
TEST_F(IOSSecurityStateTabHelperTest, SecurityInfo) {
  AddPendingItem(GURL("http://chromium.test"), ui::PAGE_TRANSITION_TYPED);
  web::NavigationItem* item =
      web_state()->GetNavigationManager()->GetVisibleItem();
  // configure |item|
  
  // add |TestBrowserState* test_browser_state()| to web::WebTest, because
  // |test_browser_state()| does not exist.
  test_browser_state()->SetOffTheRecord(...)

  IOSSecurityStateTabHelper::CreateForWebState(web_state());
  security_state::SecurityInfo info;
  IOSSecurityStateTabHelper::FromWebState(web_state())->GetSecurityInfo(&info);
  // verify |info|.
}
 
Blocking: 721898
Labels: Hotlist-HttpBad
Status: Started (was: Assigned)
Summary: Add test for HTTPBad Incognito warning on iOS (was: Add BrowserTest for HTTPBad Phase 2 on iOS)

Comment 4 by est...@chromium.org, Nov 10 2017

Labels: Hotlist-EnamelAndFriendsFixIt
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b957eee2de5a53684157f29029c34aeaf5c71e05

commit b957eee2de5a53684157f29029c34aeaf5c71e05
Author: Eric Lawrence <elawrence@chromium.org>
Date: Fri Nov 10 19:59:47 2017

Improve tests for HTTPBad Phase 2 on iOS

This CL introduces unit tests to ensure that Chrome on iOS downgrades
the security state of the page appropriately based on whether Incognito
mode is enabled.

Bug:  733311 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I6cf18230c7036178ec1fb59bf73d36619583468a
Reviewed-on: https://chromium-review.googlesource.com/763991
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Eric Lawrence <elawrence@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515651}
[modify] https://crrev.com/b957eee2de5a53684157f29029c34aeaf5c71e05/ios/chrome/browser/autofill/autofill_controller_unittest.mm
[modify] https://crrev.com/b957eee2de5a53684157f29029c34aeaf5c71e05/ios/chrome/browser/passwords/password_controller_unittest.mm
[modify] https://crrev.com/b957eee2de5a53684157f29029c34aeaf5c71e05/ios/chrome/browser/ssl/ios_security_state_tab_helper_unittest.mm
[modify] https://crrev.com/b957eee2de5a53684157f29029c34aeaf5c71e05/ios/chrome/browser/web/chrome_web_test.h

Status: Fixed (was: Started)

Sign in to add a comment