Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / api / feedback_private / feedback_browsertest.cc
index 82c2137..421c94a 100644 (file)
@@ -2,26 +2,22 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "apps/shell_window.h"
-#include "apps/shell_window_registry.h"
 #include "base/bind.h"
 #include "chrome/browser/apps/app_browsertest_util.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h"
 #include "chrome/browser/extensions/component_loader.h"
-#include "chrome/browser/extensions/event_router.h"
 #include "chrome/browser/extensions/extension_browsertest.h"
-#include "chrome/browser/extensions/extension_system.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/common/extensions/api/feedback_private.h"
 #include "chrome/test/base/in_process_browser_test.h"
 #include "chrome/test/base/ui_test_utils.h"
 #include "content/public/common/content_switches.h"
-
-using apps::ShellWindow;
-using apps::ShellWindowRegistry;
-using extensions::Extension;
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
+#include "extensions/browser/event_router.h"
+#include "extensions/browser/extension_system.h"
 
 namespace {
 
@@ -47,8 +43,8 @@ class FeedbackTest : public ExtensionBrowserTest {
 
  protected:
   bool IsFeedbackAppAvailable() {
-    return extensions::ExtensionSystem::Get(
-        browser()->profile())->event_router()->ExtensionHasEventListener(
+    return extensions::EventRouter::Get(browser()->profile())
+        ->ExtensionHasEventListener(
             kFeedbackExtensionId,
             extensions::api::feedback_private::OnFeedbackRequested::kEventName);
   }
@@ -62,10 +58,10 @@ class FeedbackTest : public ExtensionBrowserTest {
   }
 
   void VerifyFeedbackAppLaunch() {
-    ShellWindow* window =
-        PlatformAppBrowserTest::GetFirstShellWindowForBrowser(browser());
+    AppWindow* window =
+        PlatformAppBrowserTest::GetFirstAppWindowForBrowser(browser());
     ASSERT_TRUE(window);
-    const Extension* feedback_app = window->extension();
+    const Extension* feedback_app = window->GetExtension();
     ASSERT_TRUE(feedback_app);
     EXPECT_EQ(feedback_app->id(), std::string(kFeedbackExtensionId));
   }
@@ -73,7 +69,7 @@ class FeedbackTest : public ExtensionBrowserTest {
  private:
   void InvokeFeedbackUI() {
     extensions::FeedbackPrivateAPI* api =
-        extensions::FeedbackPrivateAPI::GetFactoryInstance()->GetForProfile(
+        extensions::FeedbackPrivateAPI::GetFactoryInstance()->Get(
             browser()->profile());
     api->RequestFeedback("Test description",
                          "Test tag",
@@ -81,7 +77,8 @@ class FeedbackTest : public ExtensionBrowserTest {
   }
 };
 
-IN_PROC_BROWSER_TEST_F(FeedbackTest, ShowFeedback) {
+// See http://crbug.com/369886.
+IN_PROC_BROWSER_TEST_F(FeedbackTest, DISABLED_ShowFeedback) {
   WaitForExtensionViewsToLoad();
 
   ASSERT_TRUE(IsFeedbackAppAvailable());