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 "chrome/browser/extensions/platform_app_browsertest_util.h" | 5 #include "chrome/browser/extensions/platform_app_browsertest_util.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "chrome/browser/extensions/api/tabs/tabs_api.h" | 9 #include "chrome/browser/extensions/api/tabs/tabs_api.h" |
10 #include "chrome/browser/extensions/extension_function_test_utils.h" | 10 #include "chrome/browser/extensions/extension_function_test_utils.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
156 } | 156 } |
157 | 157 |
158 void PlatformAppBrowserTest::CloseShellWindow(ShellWindow* window) { | 158 void PlatformAppBrowserTest::CloseShellWindow(ShellWindow* window) { |
159 content::WindowedNotificationObserver destroyed_observer( | 159 content::WindowedNotificationObserver destroyed_observer( |
160 content::NOTIFICATION_WEB_CONTENTS_DESTROYED, | 160 content::NOTIFICATION_WEB_CONTENTS_DESTROYED, |
161 content::NotificationService::AllSources()); | 161 content::NotificationService::AllSources()); |
162 window->GetBaseWindow()->Close(); | 162 window->GetBaseWindow()->Close(); |
163 destroyed_observer.Wait(); | 163 destroyed_observer.Wait(); |
164 } | 164 } |
165 | 165 |
166 void PlatformAppBrowserTest::CallAdjustBoundsToBeVisibleOnScreenForShellWinow( | |
167 ShellWindow* window, | |
168 const gfx::Rect& cached_bounds, | |
169 const gfx::Rect& cached_screen_bounds, | |
170 const gfx::Rect& current_screen_bounds, | |
171 const gfx::Size& minimum_size, | |
172 gfx::Rect* bounds) { | |
173 window->AdjustBoundsToBeVisibleOnScreen(cached_bounds, | |
benwells
2013/06/22 00:56:02
nit: why do you need this function in the utility
scheib
2013/06/23 04:43:37
Done.
scheib
2013/06/23 05:38:06
Ah, needed to access private function, using Platf
| |
174 cached_screen_bounds, | |
175 current_screen_bounds, | |
176 minimum_size, | |
177 bounds); | |
178 } | |
179 | |
166 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( | 180 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( |
167 CommandLine* command_line) { | 181 CommandLine* command_line) { |
168 PlatformAppBrowserTest::SetUpCommandLine(command_line); | 182 PlatformAppBrowserTest::SetUpCommandLine(command_line); |
169 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); | 183 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
170 } | 184 } |
171 | 185 |
172 } // namespace extensions | 186 } // namespace extensions |
OLD | NEW |