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