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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 class SitePerProcessFeaturePolicyBrowserTest | 709 class SitePerProcessFeaturePolicyBrowserTest |
710 : public SitePerProcessBrowserTest { | 710 : public SitePerProcessBrowserTest { |
711 public: | 711 public: |
712 SitePerProcessFeaturePolicyBrowserTest() {} | 712 SitePerProcessFeaturePolicyBrowserTest() {} |
713 | 713 |
714 protected: | 714 protected: |
715 void SetUpCommandLine(base::CommandLine* command_line) override { | 715 void SetUpCommandLine(base::CommandLine* command_line) override { |
716 SitePerProcessBrowserTest::SetUpCommandLine(command_line); | 716 SitePerProcessBrowserTest::SetUpCommandLine(command_line); |
717 // TODO(iclelland): Remove this switch when Feature Policy ships. | 717 // TODO(iclelland): Remove this switch when Feature Policy ships. |
718 // https://crbug.com/623682 | 718 // https://crbug.com/623682 |
719 command_line->AppendSwitchASCII(switches::kEnableBlinkFeatures, | 719 command_line->AppendSwitchASCII( |
720 "FeaturePolicy"); | 720 switches::kEnableBlinkFeatures, |
| 721 "FeaturePolicy,FeaturePolicyExperimentalFeatures"); |
721 } | 722 } |
722 | 723 |
723 ParsedFeaturePolicyHeader CreateFPHeader( | 724 ParsedFeaturePolicyHeader CreateFPHeader( |
724 blink::WebFeaturePolicyFeature feature, | 725 blink::WebFeaturePolicyFeature feature, |
725 const std::vector<GURL>& origins) { | 726 const std::vector<GURL>& origins) { |
726 ParsedFeaturePolicyHeader result(1); | 727 ParsedFeaturePolicyHeader result(1); |
727 result[0].feature = feature; | 728 result[0].feature = feature; |
728 result[0].matches_all_origins = false; | 729 result[0].matches_all_origins = false; |
729 DCHECK(!origins.empty()); | 730 DCHECK(!origins.empty()); |
730 for (const GURL& origin : origins) | 731 for (const GURL& origin : origins) |
(...skipping 9211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9942 names.insert(root->children[0]->frame_entry->frame_unique_name()); | 9943 names.insert(root->children[0]->frame_entry->frame_unique_name()); |
9943 } | 9944 } |
9944 | 9945 |
9945 // More than one entry in the set means that the subframe frame navigation | 9946 // More than one entry in the set means that the subframe frame navigation |
9946 // entries didn't have a consistent unique name. This will break history | 9947 // entries didn't have a consistent unique name. This will break history |
9947 // navigations =( | 9948 // navigations =( |
9948 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; | 9949 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; |
9949 } | 9950 } |
9950 | 9951 |
9951 } // namespace content | 9952 } // namespace content |
OLD | NEW |