| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 EXPECT_TRUE(policy->CanRequestURL( | 724 EXPECT_TRUE(policy->CanRequestURL( |
| 725 main_frame->GetProcess()->GetID(), | 725 main_frame->GetProcess()->GetID(), |
| 726 GURL("filesystem:chrome-extension://some-extension-id/some-path"))); | 726 GURL("filesystem:chrome-extension://some-extension-id/some-path"))); |
| 727 EXPECT_TRUE(policy->CanRequestURL( | 727 EXPECT_TRUE(policy->CanRequestURL( |
| 728 extension_frame->GetProcess()->GetID(), | 728 extension_frame->GetProcess()->GetID(), |
| 729 GURL("chrome-extension://some-extension-id/resource.html"))); | 729 GURL("chrome-extension://some-extension-id/resource.html"))); |
| 730 EXPECT_TRUE(policy->CanRequestURL( | 730 EXPECT_TRUE(policy->CanRequestURL( |
| 731 main_frame->GetProcess()->GetID(), | 731 main_frame->GetProcess()->GetID(), |
| 732 GURL("chrome-extension://some-extension-id/resource.html"))); | 732 GURL("chrome-extension://some-extension-id/resource.html"))); |
| 733 | 733 |
| 734 if (IsIsolateExtensionsEnabled()) { | 734 if (extensions::IsIsolateExtensionsEnabled()) { |
| 735 EXPECT_TRUE(policy->CanCommitURL( | 735 EXPECT_TRUE(policy->CanCommitURL( |
| 736 extension_frame->GetProcess()->GetID(), | 736 extension_frame->GetProcess()->GetID(), |
| 737 GURL("blob:chrome-extension://some-extension-id/some-guid"))); | 737 GURL("blob:chrome-extension://some-extension-id/some-guid"))); |
| 738 EXPECT_FALSE(policy->CanCommitURL( | 738 EXPECT_FALSE(policy->CanCommitURL( |
| 739 main_frame->GetProcess()->GetID(), | 739 main_frame->GetProcess()->GetID(), |
| 740 GURL("blob:chrome-extension://some-extension-id/some-guid"))); | 740 GURL("blob:chrome-extension://some-extension-id/some-guid"))); |
| 741 EXPECT_TRUE(policy->CanCommitURL( | 741 EXPECT_TRUE(policy->CanCommitURL( |
| 742 extension_frame->GetProcess()->GetID(), | 742 extension_frame->GetProcess()->GetID(), |
| 743 GURL("chrome-extension://some-extension-id/resource.html"))); | 743 GURL("chrome-extension://some-extension-id/resource.html"))); |
| 744 EXPECT_FALSE(policy->CanCommitURL( | 744 EXPECT_FALSE(policy->CanCommitURL( |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 EXPECT_TRUE(ExecuteScriptAndExtractBool( | 1155 EXPECT_TRUE(ExecuteScriptAndExtractBool( |
| 1156 popup, "window.domAutomationController.send(!!window.opener)", | 1156 popup, "window.domAutomationController.send(!!window.opener)", |
| 1157 &is_opener_defined)); | 1157 &is_opener_defined)); |
| 1158 EXPECT_TRUE(is_opener_defined); | 1158 EXPECT_TRUE(is_opener_defined); |
| 1159 | 1159 |
| 1160 // Verify that postMessage to window.opener works. | 1160 // Verify that postMessage to window.opener works. |
| 1161 VerifyPostMessageToOpener(popup->GetMainFrame(), extension_frame); | 1161 VerifyPostMessageToOpener(popup->GetMainFrame(), extension_frame); |
| 1162 } | 1162 } |
| 1163 | 1163 |
| 1164 } // namespace extensions | 1164 } // namespace extensions |
| OLD | NEW |