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 "chrome/browser/apps/app_browsertest_util.h" | 5 #include "chrome/browser/apps/app_browsertest_util.h" |
6 #include "chrome/browser/lifetime/application_lifetime.h" | 6 #include "chrome/browser/lifetime/application_lifetime.h" |
7 #include "chrome/browser/ui/browser_iterator.h" | 7 #include "chrome/browser/ui/browser_iterator.h" |
8 #include "chrome/browser/ui/browser_window.h" | 8 #include "chrome/browser/ui/browser_window.h" |
9 #include "chrome/test/base/interactive_test_utils.h" | 9 #include "chrome/test/base/interactive_test_utils.h" |
10 #include "extensions/browser/app_window/native_app_window.h" | 10 #include "extensions/browser/app_window/native_app_window.h" |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 AppWindow* app_window = GetFirstAppWindow(); | 490 AppWindow* app_window = GetFirstAppWindow(); |
491 EXPECT_TRUE(app_window->is_hidden()); | 491 EXPECT_TRUE(app_window->is_hidden()); |
492 ExtensionTestMessageListener create_listener_2("Launched", false); | 492 ExtensionTestMessageListener create_listener_2("Launched", false); |
493 create_listener_1.Reply("createVisible"); | 493 create_listener_1.Reply("createVisible"); |
494 EXPECT_TRUE(create_listener_2.WaitUntilSatisfied()); | 494 EXPECT_TRUE(create_listener_2.WaitUntilSatisfied()); |
495 EXPECT_FALSE(app_window->is_hidden()); | 495 EXPECT_FALSE(app_window->is_hidden()); |
496 app_window->GetBaseWindow()->Close(); | 496 app_window->GetBaseWindow()->Close(); |
497 } | 497 } |
498 } | 498 } |
499 | 499 |
| 500 IN_PROC_BROWSER_TEST_F(AppWindowInteractiveTest, TestFullscreen) { |
| 501 ASSERT_TRUE(RunAppWindowInteractiveTest("testFullscreen")) << message_; |
| 502 } |
| 503 |
500 // Only Linux and Windows use keep-alive to determine when to shut down. | 504 // Only Linux and Windows use keep-alive to determine when to shut down. |
501 #if defined(OS_LINUX) || defined(OS_WIN) | 505 #if defined(OS_LINUX) || defined(OS_WIN) |
502 | 506 |
503 // In general, hidden windows should not keep Chrome alive. The exception is | 507 // In general, hidden windows should not keep Chrome alive. The exception is |
504 // when windows are created hidden, we allow the app some time to show the | 508 // when windows are created hidden, we allow the app some time to show the |
505 // the window. | 509 // the window. |
506 class AppWindowHiddenKeepAliveTest : public extensions::PlatformAppBrowserTest { | 510 class AppWindowHiddenKeepAliveTest : public extensions::PlatformAppBrowserTest { |
507 protected: | 511 protected: |
508 AppWindowHiddenKeepAliveTest() {} | 512 AppWindowHiddenKeepAliveTest() {} |
509 | 513 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 // The app window will show after 3 seconds. | 568 // The app window will show after 3 seconds. |
565 ExtensionTestMessageListener shown_listener("Shown", false); | 569 ExtensionTestMessageListener shown_listener("Shown", false); |
566 launched_listener.Reply(""); | 570 launched_listener.Reply(""); |
567 EXPECT_TRUE(shown_listener.WaitUntilSatisfied()); | 571 EXPECT_TRUE(shown_listener.WaitUntilSatisfied()); |
568 EXPECT_FALSE(app_window->is_hidden()); | 572 EXPECT_FALSE(app_window->is_hidden()); |
569 EXPECT_TRUE(chrome::WillKeepAlive()); | 573 EXPECT_TRUE(chrome::WillKeepAlive()); |
570 app_window->GetBaseWindow()->Close(); | 574 app_window->GetBaseWindow()->Close(); |
571 } | 575 } |
572 | 576 |
573 #endif | 577 #endif |
OLD | NEW |