| 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 "base/macros.h" | 5 #include "base/macros.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "chrome/browser/apps/app_browsertest_util.h" | 7 #include "chrome/browser/apps/app_browsertest_util.h" |
| 8 #include "chrome/browser/lifetime/application_lifetime.h" | 8 #include "chrome/browser/lifetime/application_lifetime.h" |
| 9 #include "chrome/browser/lifetime/keep_alive_registry.h" | 9 #include "chrome/browser/lifetime/keep_alive_registry.h" |
| 10 #include "chrome/browser/lifetime/keep_alive_types.h" | 10 #include "chrome/browser/lifetime/keep_alive_types.h" |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 342 |
| 343 void AppWindowInteractiveTest::TestOuterBoundsHelper( | 343 void AppWindowInteractiveTest::TestOuterBoundsHelper( |
| 344 const std::string& frame_type) { | 344 const std::string& frame_type) { |
| 345 ExtensionTestMessageListener launched_listener("Launched", true); | 345 ExtensionTestMessageListener launched_listener("Launched", true); |
| 346 const extensions::Extension* app = | 346 const extensions::Extension* app = |
| 347 LoadAndLaunchPlatformApp("outer_bounds", &launched_listener); | 347 LoadAndLaunchPlatformApp("outer_bounds", &launched_listener); |
| 348 | 348 |
| 349 launched_listener.Reply(frame_type); | 349 launched_listener.Reply(frame_type); |
| 350 launched_listener.Reset(); | 350 launched_listener.Reset(); |
| 351 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); | 351 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); |
| 352 launched_listener.Reply(std::string()); |
| 352 | 353 |
| 353 AppWindow* window = GetFirstAppWindowForApp(app->id()); | 354 AppWindow* window = GetFirstAppWindowForApp(app->id()); |
| 354 gfx::Rect window_bounds; | 355 gfx::Rect window_bounds; |
| 355 gfx::Size min_size, max_size; | 356 gfx::Size min_size, max_size; |
| 356 | 357 |
| 357 #if defined(OS_WIN) | 358 #if defined(OS_WIN) |
| 358 // Get the bounds from the HWND. | 359 // Get the bounds from the HWND. |
| 359 HWND hwnd = views::HWNDForNativeWindow(window->GetNativeWindow()); | 360 HWND hwnd = views::HWNDForNativeWindow(window->GetNativeWindow()); |
| 360 RECT rect; | 361 RECT rect; |
| 361 ::GetWindowRect(hwnd, &rect); | 362 ::GetWindowRect(hwnd, &rect); |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 ExtensionTestMessageListener shown_listener("Shown", false); | 562 ExtensionTestMessageListener shown_listener("Shown", false); |
| 562 launched_listener.Reply(""); | 563 launched_listener.Reply(""); |
| 563 EXPECT_TRUE(shown_listener.WaitUntilSatisfied()); | 564 EXPECT_TRUE(shown_listener.WaitUntilSatisfied()); |
| 564 EXPECT_FALSE(app_window->is_hidden()); | 565 EXPECT_FALSE(app_window->is_hidden()); |
| 565 EXPECT_TRUE(KeepAliveRegistry::GetInstance()->IsOriginRegistered( | 566 EXPECT_TRUE(KeepAliveRegistry::GetInstance()->IsOriginRegistered( |
| 566 KeepAliveOrigin::CHROME_APP_DELEGATE)); | 567 KeepAliveOrigin::CHROME_APP_DELEGATE)); |
| 567 app_window->GetBaseWindow()->Close(); | 568 app_window->GetBaseWindow()->Close(); |
| 568 } | 569 } |
| 569 | 570 |
| 570 #endif | 571 #endif |
| OLD | NEW |