Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / apps / event_page_browsertest.cc
index 2799aee..e547bdc 100644 (file)
@@ -3,11 +3,11 @@
 // found in the LICENSE file.
 
 #include "chrome/browser/apps/app_browsertest_util.h"
-#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/extensions/extension_test_message_listener.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/test/browser_test.h"
 #include "content/public/test/test_utils.h"
+#include "extensions/browser/notification_types.h"
+#include "extensions/test/extension_test_message_listener.h"
 
 using extensions::Extension;
 using extensions::PlatformAppBrowserTest;
@@ -18,20 +18,18 @@ class AppEventPageTest : public PlatformAppBrowserTest {
  protected:
   void TestUnloadEventPage(const char* app_path) {
     // Load and launch the app.
-    ExtensionTestMessageListener launched_listener("launched", false);
-    const Extension* extension = LoadAndLaunchPlatformApp(app_path);
+    const Extension* extension = LoadAndLaunchPlatformApp(app_path, "launched");
     ASSERT_TRUE(extension);
-    ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
 
     content::WindowedNotificationObserver event_page_suspended(
-        chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
+        extensions::NOTIFICATION_EXTENSION_HOST_DESTROYED,
         content::NotificationService::AllSources());
 
     // Close the app window.
-    EXPECT_EQ(1U, GetShellWindowCount());
-    apps::ShellWindow* shell_window = GetFirstShellWindow();
-    ASSERT_TRUE(shell_window);
-    CloseShellWindow(shell_window);
+    EXPECT_EQ(1U, GetAppWindowCount());
+    extensions::AppWindow* app_window = GetFirstAppWindow();
+    ASSERT_TRUE(app_window);
+    CloseAppWindow(app_window);
 
     // Verify that the event page is destroyed.
     event_page_suspended.Wait();