| 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/extensions/extension_test_message_listener.h" | 6 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| 7 #include "chrome/test/base/interactive_test_utils.h" | 7 #include "chrome/test/base/interactive_test_utils.h" |
| 8 #include "extensions/browser/app_window/native_app_window.h" | 8 #include "extensions/browser/app_window/native_app_window.h" |
| 9 #include "extensions/test/result_catcher.h" |
| 9 | 10 |
| 10 #if defined(OS_MACOSX) && !defined(OS_IOS) | 11 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 11 #include "base/mac/mac_util.h" | 12 #include "base/mac/mac_util.h" |
| 12 #endif | 13 #endif |
| 13 | 14 |
| 14 #if defined(OS_WIN) | 15 #if defined(OS_WIN) |
| 15 #include <windows.h> | 16 #include <windows.h> |
| 16 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
| 17 #include "ui/aura/window_tree_host.h" | 18 #include "ui/aura/window_tree_host.h" |
| 18 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" | 19 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 42 | 43 |
| 43 DISALLOW_COPY_AND_ASSIGN(FullscreenChangeWaiter); | 44 DISALLOW_COPY_AND_ASSIGN(FullscreenChangeWaiter); |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 class AppWindowInteractiveTest : public extensions::PlatformAppBrowserTest { | 47 class AppWindowInteractiveTest : public extensions::PlatformAppBrowserTest { |
| 47 public: | 48 public: |
| 48 bool RunAppWindowInteractiveTest(const char* testName) { | 49 bool RunAppWindowInteractiveTest(const char* testName) { |
| 49 ExtensionTestMessageListener launched_listener("Launched", true); | 50 ExtensionTestMessageListener launched_listener("Launched", true); |
| 50 LoadAndLaunchPlatformApp("window_api_interactive", &launched_listener); | 51 LoadAndLaunchPlatformApp("window_api_interactive", &launched_listener); |
| 51 | 52 |
| 52 ResultCatcher catcher; | 53 extensions::ResultCatcher catcher; |
| 53 launched_listener.Reply(testName); | 54 launched_listener.Reply(testName); |
| 54 | 55 |
| 55 if (!catcher.GetNextResult()) { | 56 if (!catcher.GetNextResult()) { |
| 56 message_ = catcher.message(); | 57 message_ = catcher.message(); |
| 57 return false; | 58 return false; |
| 58 } | 59 } |
| 59 | 60 |
| 60 return true; | 61 return true; |
| 61 } | 62 } |
| 62 | 63 |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 ASSERT_TRUE(RunAppWindowInteractiveTest("testCreate")) << message_; | 450 ASSERT_TRUE(RunAppWindowInteractiveTest("testCreate")) << message_; |
| 450 } | 451 } |
| 451 | 452 |
| 452 IN_PROC_BROWSER_TEST_F(AppWindowInteractiveTest, MAYBE_TestShow) { | 453 IN_PROC_BROWSER_TEST_F(AppWindowInteractiveTest, MAYBE_TestShow) { |
| 453 ASSERT_TRUE(RunAppWindowInteractiveTest("testShow")) << message_; | 454 ASSERT_TRUE(RunAppWindowInteractiveTest("testShow")) << message_; |
| 454 } | 455 } |
| 455 | 456 |
| 456 IN_PROC_BROWSER_TEST_F(AppWindowInteractiveTest, TestDrawAttention) { | 457 IN_PROC_BROWSER_TEST_F(AppWindowInteractiveTest, TestDrawAttention) { |
| 457 ASSERT_TRUE(RunAppWindowInteractiveTest("testDrawAttention")) << message_; | 458 ASSERT_TRUE(RunAppWindowInteractiveTest("testDrawAttention")) << message_; |
| 458 } | 459 } |
| OLD | NEW |