Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / apps / shaped_app_window_targeter_unittest.cc
index cd4d8c2..ace30ac 100644 (file)
@@ -4,11 +4,13 @@
 
 #include "chrome/browser/ui/views/apps/shaped_app_window_targeter.h"
 
+#include "apps/ui/views/app_window_frame_view.h"
 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
 #include "ui/aura/test/aura_test_base.h"
 #include "ui/aura/window.h"
 #include "ui/aura/window_event_dispatcher.h"
 #include "ui/views/controls/webview/webview.h"
+#include "ui/wm/core/default_activation_client.h"
 #include "ui/wm/core/easy_resize_window_targeter.h"
 
 class ShapedAppWindowTargeterTest : public aura::test::AuraTestBase {
@@ -27,6 +29,7 @@ class ShapedAppWindowTargeterTest : public aura::test::AuraTestBase {
  protected:
   virtual void SetUp() OVERRIDE {
     aura::test::AuraTestBase::SetUp();
+    new wm::DefaultActivationClient(root_window());
     widget_.reset(new views::Widget);
     views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
     params.remove_standard_frame = true;
@@ -184,9 +187,10 @@ TEST_F(ShapedAppWindowTargeterTest, ResizeInsetsWithinBounds) {
     EXPECT_EQ(window, move.target());
   }
 
-  // The EasyResizeTargeter specifies an inset of 5px within the window.
-  app_window_views()->InstallEasyResizeTargeterOnContainer();
-
+#if !defined(OS_CHROMEOS)
+  // The non standard app frame has a easy resize targetter installed.
+  scoped_ptr<apps::AppWindowFrameView> frame(
+      app_window_views()->CreateNonStandardAppFrame());
   {
     // Ensure that the window has an event targeter (there should be an
     // EasyResizeWindowTargeter installed).
@@ -223,4 +227,5 @@ TEST_F(ShapedAppWindowTargeterTest, ResizeInsetsWithinBounds) {
     ASSERT_FALSE(details.dispatcher_destroyed);
     EXPECT_EQ(window, move.target());
   }
+#endif  // defined (OS_CHROMEOS)
 }