| 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 "content/browser/site_per_process_browsertest.h" | 5 #include "content/browser/site_per_process_browsertest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 | 733 |
| 734 ParsedFeaturePolicyHeader CreateFPHeaderMatchesAll( | 734 ParsedFeaturePolicyHeader CreateFPHeaderMatchesAll( |
| 735 blink::WebFeaturePolicyFeature feature) { | 735 blink::WebFeaturePolicyFeature feature) { |
| 736 ParsedFeaturePolicyHeader result(1); | 736 ParsedFeaturePolicyHeader result(1); |
| 737 result[0].feature = feature; | 737 result[0].feature = feature; |
| 738 result[0].matches_all_origins = true; | 738 result[0].matches_all_origins = true; |
| 739 return result; | 739 return result; |
| 740 } | 740 } |
| 741 }; | 741 }; |
| 742 | 742 |
| 743 bool operator==(const ParsedFeaturePolicyDeclaration& first, | |
| 744 const ParsedFeaturePolicyDeclaration& second) { | |
| 745 return std::tie(first.feature, first.matches_all_origins, first.origins) == | |
| 746 std::tie(second.feature, second.matches_all_origins, second.origins); | |
| 747 } | |
| 748 | |
| 749 IN_PROC_BROWSER_TEST_F(SitePerProcessHighDPIBrowserTest, | 743 IN_PROC_BROWSER_TEST_F(SitePerProcessHighDPIBrowserTest, |
| 750 SubframeLoadsWithCorrectDeviceScaleFactor) { | 744 SubframeLoadsWithCorrectDeviceScaleFactor) { |
| 751 GURL main_url(embedded_test_server()->GetURL( | 745 GURL main_url(embedded_test_server()->GetURL( |
| 752 "a.com", "/cross_site_iframe_factory.html?a(b)")); | 746 "a.com", "/cross_site_iframe_factory.html?a(b)")); |
| 753 EXPECT_TRUE(NavigateToURL(shell(), main_url)); | 747 EXPECT_TRUE(NavigateToURL(shell(), main_url)); |
| 754 | 748 |
| 755 // On Android forcing device scale factor does not work for tests, therefore | 749 // On Android forcing device scale factor does not work for tests, therefore |
| 756 // we ensure that make frame and iframe have the same DIP scale there, but | 750 // we ensure that make frame and iframe have the same DIP scale there, but |
| 757 // not necessarily kDeviceScaleFactor. | 751 // not necessarily kDeviceScaleFactor. |
| 758 const double expected_dip_scale = | 752 const double expected_dip_scale = |
| (...skipping 9102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9861 names.insert(root->children[0]->frame_entry->frame_unique_name()); | 9855 names.insert(root->children[0]->frame_entry->frame_unique_name()); |
| 9862 } | 9856 } |
| 9863 | 9857 |
| 9864 // More than one entry in the set means that the subframe frame navigation | 9858 // More than one entry in the set means that the subframe frame navigation |
| 9865 // entries didn't have a consistent unique name. This will break history | 9859 // entries didn't have a consistent unique name. This will break history |
| 9866 // navigations =( | 9860 // navigations =( |
| 9867 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; | 9861 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; |
| 9868 } | 9862 } |
| 9869 | 9863 |
| 9870 } // namespace content | 9864 } // namespace content |
| OLD | NEW |