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

Side by Side Diff: content/browser/site_per_process_browsertest.cc

Issue 2797813002: Replicate feature policy container policies. (Closed)
Patch Set: Cleanup, reponding to review comments Created 3 years, 8 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
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 "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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 734
735 ParsedFeaturePolicyHeader CreateFPHeaderMatchesAll( 735 ParsedFeaturePolicyHeader CreateFPHeaderMatchesAll(
736 blink::WebFeaturePolicyFeature feature) { 736 blink::WebFeaturePolicyFeature feature) {
737 ParsedFeaturePolicyHeader result(1); 737 ParsedFeaturePolicyHeader result(1);
738 result[0].feature = feature; 738 result[0].feature = feature;
739 result[0].matches_all_origins = true; 739 result[0].matches_all_origins = true;
740 return result; 740 return result;
741 } 741 }
742 }; 742 };
743 743
744 bool operator==(const ParsedFeaturePolicyDeclaration& first,
745 const ParsedFeaturePolicyDeclaration& second) {
746 return std::tie(first.feature, first.matches_all_origins, first.origins) ==
747 std::tie(second.feature, second.matches_all_origins, second.origins);
748 }
749
750 IN_PROC_BROWSER_TEST_F(SitePerProcessHighDPIBrowserTest, 744 IN_PROC_BROWSER_TEST_F(SitePerProcessHighDPIBrowserTest,
751 SubframeLoadsWithCorrectDeviceScaleFactor) { 745 SubframeLoadsWithCorrectDeviceScaleFactor) {
752 GURL main_url(embedded_test_server()->GetURL( 746 GURL main_url(embedded_test_server()->GetURL(
753 "a.com", "/cross_site_iframe_factory.html?a(b)")); 747 "a.com", "/cross_site_iframe_factory.html?a(b)"));
754 EXPECT_TRUE(NavigateToURL(shell(), main_url)); 748 EXPECT_TRUE(NavigateToURL(shell(), main_url));
755 749
756 // On Android forcing device scale factor does not work for tests, therefore 750 // On Android forcing device scale factor does not work for tests, therefore
757 // we ensure that make frame and iframe have the same DIP scale there, but 751 // we ensure that make frame and iframe have the same DIP scale there, but
758 // not necessarily kDeviceScaleFactor. 752 // not necessarily kDeviceScaleFactor.
759 const double expected_dip_scale = 753 const double expected_dip_scale =
(...skipping 9119 matching lines...) Expand 10 before | Expand all | Expand 10 after
9879 names.insert(root->children[0]->frame_entry->frame_unique_name()); 9873 names.insert(root->children[0]->frame_entry->frame_unique_name());
9880 } 9874 }
9881 9875
9882 // More than one entry in the set means that the subframe frame navigation 9876 // More than one entry in the set means that the subframe frame navigation
9883 // entries didn't have a consistent unique name. This will break history 9877 // entries didn't have a consistent unique name. This will break history
9884 // navigations =( 9878 // navigations =(
9885 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; 9879 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!";
9886 } 9880 }
9887 9881
9888 } // namespace content 9882 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698