| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" | 9 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" |
| 10 #include "chrome/browser/extensions/browser_action_test_util.h" | 10 #include "chrome/browser/extensions/browser_action_test_util.h" |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 | 715 |
| 716 // Simulate a click on the browser action to open the popup. | 716 // Simulate a click on the browser action to open the popup. |
| 717 ASSERT_TRUE(OpenPopup(0)); | 717 ASSERT_TRUE(OpenPopup(0)); |
| 718 | 718 |
| 719 // Find the RenderFrameHost associated with the iframe in the popup. | 719 // Find the RenderFrameHost associated with the iframe in the popup. |
| 720 content::RenderFrameHost* frame_host = nullptr; | 720 content::RenderFrameHost* frame_host = nullptr; |
| 721 extensions::ProcessManager* manager = | 721 extensions::ProcessManager* manager = |
| 722 extensions::ProcessManager::Get(browser()->profile()); | 722 extensions::ProcessManager::Get(browser()->profile()); |
| 723 std::set<content::RenderFrameHost*> frame_hosts = | 723 std::set<content::RenderFrameHost*> frame_hosts = |
| 724 manager->GetRenderFrameHostsForExtension(extension->id()); | 724 manager->GetRenderFrameHostsForExtension(extension->id()); |
| 725 for (auto host : frame_hosts) { | 725 for (auto* host : frame_hosts) { |
| 726 if (host->GetFrameName() == "child_frame") { | 726 if (host->GetFrameName() == "child_frame") { |
| 727 frame_host = host; | 727 frame_host = host; |
| 728 break; | 728 break; |
| 729 } | 729 } |
| 730 } | 730 } |
| 731 | 731 |
| 732 ASSERT_TRUE(frame_host); | 732 ASSERT_TRUE(frame_host); |
| 733 EXPECT_EQ(extension->GetResourceURL("frame.html"), | 733 EXPECT_EQ(extension->GetResourceURL("frame.html"), |
| 734 frame_host->GetLastCommittedURL()); | 734 frame_host->GetLastCommittedURL()); |
| 735 EXPECT_TRUE(frame_host->GetParent()); | 735 EXPECT_TRUE(frame_host->GetParent()); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 test_data_dir_.AppendASCII("browser_action/open_popup_on_reply"))); | 790 test_data_dir_.AppendASCII("browser_action/open_popup_on_reply"))); |
| 791 EXPECT_TRUE(listener.WaitUntilSatisfied()); | 791 EXPECT_TRUE(listener.WaitUntilSatisfied()); |
| 792 | 792 |
| 793 ResultCatcher catcher; | 793 ResultCatcher catcher; |
| 794 listener.Reply(std::string()); | 794 listener.Reply(std::string()); |
| 795 EXPECT_TRUE(catcher.GetNextResult()) << message_; | 795 EXPECT_TRUE(catcher.GetNextResult()) << message_; |
| 796 } | 796 } |
| 797 | 797 |
| 798 } // namespace | 798 } // namespace |
| 799 } // namespace extensions | 799 } // namespace extensions |
| OLD | NEW |