OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 if (active_web_contents->GetLastCommittedURL() == frame_url) | 121 if (active_web_contents->GetLastCommittedURL() == frame_url) |
122 return active_web_contents->GetMainFrame(); | 122 return active_web_contents->GetMainFrame(); |
123 | 123 |
124 content::RenderFrameHost* frame_host = NULL; | 124 content::RenderFrameHost* frame_host = NULL; |
125 active_web_contents->ForEachFrame( | 125 active_web_contents->ForEachFrame( |
126 base::Bind(&FindFrame, frame_url, &frame_host)); | 126 base::Bind(&FindFrame, frame_url, &frame_host)); |
127 return frame_host; | 127 return frame_host; |
128 } | 128 } |
129 | 129 |
130 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 130 virtual void SetUpCommandLine(CommandLine* command_line) override { |
131 FeatureSwitch::ScopedOverride enable_options( | 131 FeatureSwitch::ScopedOverride enable_options( |
132 FeatureSwitch::embedded_extension_options(), true); | 132 FeatureSwitch::embedded_extension_options(), true); |
133 // Need to add a command line flag as well as a FeatureSwitch because the | 133 // Need to add a command line flag as well as a FeatureSwitch because the |
134 // FeatureSwitch is not copied over to the renderer process from the | 134 // FeatureSwitch is not copied over to the renderer process from the |
135 // browser process. | 135 // browser process. |
136 command_line->AppendSwitch(switches::kEnableEmbeddedExtensionOptions); | 136 command_line->AppendSwitch(switches::kEnableEmbeddedExtensionOptions); |
137 ExtensionApiTest::SetUpCommandLine(command_line); | 137 ExtensionApiTest::SetUpCommandLine(command_line); |
138 } | 138 } |
139 | 139 |
140 scoped_ptr<FeatureSwitch::ScopedOverride> enable_options_; | 140 scoped_ptr<FeatureSwitch::ScopedOverride> enable_options_; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 ASSERT_TRUE(listener->WaitUntilSatisfied()); | 238 ASSERT_TRUE(listener->WaitUntilSatisfied()); |
239 listener->Reply(extension->id()); | 239 listener->Reply(extension->id()); |
240 listener.reset(new ExtensionTestMessageListener("onclose received", false)); | 240 listener.reset(new ExtensionTestMessageListener("onclose received", false)); |
241 ASSERT_TRUE(listener->WaitUntilSatisfied()); | 241 ASSERT_TRUE(listener->WaitUntilSatisfied()); |
242 } | 242 } |
243 | 243 |
244 } // namespace | 244 } // namespace |
245 | 245 |
246 } // namespace extensions | 246 } // namespace extensions |
OLD | NEW |