Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / apps / window_controls_browsertest.cc
index 172aa32..75feeab 100644 (file)
@@ -3,17 +3,17 @@
 // found in the LICENSE file.
 
 #include "chrome/browser/apps/app_browsertest_util.h"
-#include "chrome/browser/extensions/extension_test_message_listener.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/common/chrome_switches.h"
 #include "content/public/test/browser_test_utils.h"
 #include "extensions/browser/process_manager.h"
+#include "extensions/common/switches.h"
+#include "extensions/test/extension_test_message_listener.h"
 
 class WindowControlsTest : public extensions::PlatformAppBrowserTest {
  protected:
-  virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+  void SetUpCommandLine(CommandLine* command_line) override {
     extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line);
-    command_line->AppendSwitch(switches::kEnableAppWindowControls);
+    command_line->AppendSwitch(extensions::switches::kEnableAppWindowControls);
   }
   content::WebContents* GetWebContentsForExtensionWindow(
       const extensions::Extension* extension);
@@ -22,7 +22,7 @@ class WindowControlsTest : public extensions::PlatformAppBrowserTest {
 content::WebContents* WindowControlsTest::GetWebContentsForExtensionWindow(
     const extensions::Extension* extension) {
   extensions::ProcessManager* process_manager =
-      extensions::ExtensionSystem::Get(profile())->process_manager();
+      extensions::ProcessManager::Get(profile());
 
   // Lookup render view host for background page.
   const extensions::ExtensionHost* extension_host =
@@ -52,10 +52,8 @@ content::WebContents* WindowControlsTest::GetWebContentsForExtensionWindow(
 
 IN_PROC_BROWSER_TEST_F(WindowControlsTest, CloseControlWorks) {
   // Launch app and wait for window to show up
-  ExtensionTestMessageListener window_opened("window-opened", false);
   const extensions::Extension* extension =
-      LoadAndLaunchPlatformApp("window_controls/buttons");
-  ASSERT_TRUE(window_opened.WaitUntilSatisfied());
+      LoadAndLaunchPlatformApp("window_controls/buttons", "window-opened");
 
   // Find WebContents of window
   content::WebContents* web_contents =