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" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "chrome/browser/chrome_notification_types.h" |
13 #include "chrome/browser/extensions/browser_action_test_util.h" | 14 #include "chrome/browser/extensions/browser_action_test_util.h" |
14 #include "chrome/browser/extensions/extension_browsertest.h" | 15 #include "chrome/browser/extensions/extension_browsertest.h" |
15 #include "chrome/browser/extensions/extension_service.h" | 16 #include "chrome/browser/extensions/extension_service.h" |
16 #include "chrome/browser/extensions/test_extension_dir.h" | 17 #include "chrome/browser/extensions/test_extension_dir.h" |
17 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 18 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
18 #include "chrome/common/extensions/extension_process_policy.h" | 19 #include "chrome/common/extensions/extension_process_policy.h" |
19 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
20 #include "chrome/test/base/in_process_browser_test.h" | 21 #include "chrome/test/base/in_process_browser_test.h" |
21 #include "chrome/test/base/ui_test_utils.h" | 22 #include "chrome/test/base/ui_test_utils.h" |
22 #include "content/public/browser/child_process_security_policy.h" | 23 #include "content/public/browser/child_process_security_policy.h" |
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 EXPECT_TRUE(ExecuteScriptAndExtractBool( | 950 EXPECT_TRUE(ExecuteScriptAndExtractBool( |
950 popup, "window.domAutomationController.send(!!window.opener)", | 951 popup, "window.domAutomationController.send(!!window.opener)", |
951 &is_opener_defined)); | 952 &is_opener_defined)); |
952 EXPECT_TRUE(is_opener_defined); | 953 EXPECT_TRUE(is_opener_defined); |
953 | 954 |
954 // Verify that postMessage to window.opener works. | 955 // Verify that postMessage to window.opener works. |
955 VerifyPostMessageToOpener(popup->GetMainFrame(), extension_frame); | 956 VerifyPostMessageToOpener(popup->GetMainFrame(), extension_frame); |
956 } | 957 } |
957 | 958 |
958 } // namespace extensions | 959 } // namespace extensions |
OLD | NEW |