| 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/page_info/page_info.h" | 5 #include "chrome/browser/ui/page_info/page_info.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 SetURL("about:blank"); | 670 SetURL("about:blank"); |
| 671 SetDefaultUIExpectations(mock_ui()); | 671 SetDefaultUIExpectations(mock_ui()); |
| 672 EXPECT_EQ(PageInfo::SITE_CONNECTION_STATUS_UNENCRYPTED, | 672 EXPECT_EQ(PageInfo::SITE_CONNECTION_STATUS_UNENCRYPTED, |
| 673 page_info()->site_connection_status()); | 673 page_info()->site_connection_status()); |
| 674 EXPECT_EQ(PageInfo::SITE_IDENTITY_STATUS_NO_CERT, | 674 EXPECT_EQ(PageInfo::SITE_IDENTITY_STATUS_NO_CERT, |
| 675 page_info()->site_identity_status()); | 675 page_info()->site_identity_status()); |
| 676 EXPECT_EQ(base::string16(), page_info()->organization_name()); | 676 EXPECT_EQ(base::string16(), page_info()->organization_name()); |
| 677 } | 677 } |
| 678 | 678 |
| 679 // On desktop, internal URLs aren't handled by PageInfo class. Instead, a | 679 // On desktop, internal URLs aren't handled by PageInfo class. Instead, a |
| 680 // custom and simpler popup is shown, so no need to test. | 680 // custom and simpler bubble is shown, so no need to test. |
| 681 #if defined(OS_ANDROID) || defined(OS_IOS) | 681 #if defined(OS_ANDROID) || defined(OS_IOS) |
| 682 TEST_F(PageInfoTest, InternalPage) { | 682 TEST_F(PageInfoTest, InternalPage) { |
| 683 SetURL("chrome://bookmarks"); | 683 SetURL("chrome://bookmarks"); |
| 684 SetDefaultUIExpectations(mock_ui()); | 684 SetDefaultUIExpectations(mock_ui()); |
| 685 EXPECT_EQ(PageInfo::SITE_CONNECTION_STATUS_INTERNAL_PAGE, | 685 EXPECT_EQ(PageInfo::SITE_CONNECTION_STATUS_INTERNAL_PAGE, |
| 686 page_info()->site_connection_status()); | 686 page_info()->site_connection_status()); |
| 687 EXPECT_EQ(PageInfo::SITE_IDENTITY_STATUS_INTERNAL_PAGE, | 687 EXPECT_EQ(PageInfo::SITE_IDENTITY_STATUS_INTERNAL_PAGE, |
| 688 page_info()->site_identity_status()); | 688 page_info()->site_identity_status()); |
| 689 EXPECT_EQ(base::string16(), page_info()->organization_name()); | 689 EXPECT_EQ(base::string16(), page_info()->organization_name()); |
| 690 } | 690 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 // call, so it is called twice in total. | 736 // call, so it is called twice in total. |
| 737 histograms.ExpectTotalCount(kGenericHistogram, 2); | 737 histograms.ExpectTotalCount(kGenericHistogram, 2); |
| 738 histograms.ExpectBucketCount(kGenericHistogram, | 738 histograms.ExpectBucketCount(kGenericHistogram, |
| 739 PageInfo::PageInfoAction::PAGE_INFO_OPENED, 2); | 739 PageInfo::PageInfoAction::PAGE_INFO_OPENED, 2); |
| 740 | 740 |
| 741 histograms.ExpectTotalCount(test.histogram_name, 2); | 741 histograms.ExpectTotalCount(test.histogram_name, 2); |
| 742 histograms.ExpectBucketCount(test.histogram_name, | 742 histograms.ExpectBucketCount(test.histogram_name, |
| 743 PageInfo::PageInfoAction::PAGE_INFO_OPENED, 2); | 743 PageInfo::PageInfoAction::PAGE_INFO_OPENED, 2); |
| 744 } | 744 } |
| 745 } | 745 } |
| OLD | NEW |