This source file includes following definitions.
- IN_PROC_BROWSER_TEST_F
- IN_PROC_BROWSER_TEST_F
- IN_PROC_BROWSER_TEST_F
#include "apps/ui/native_app_window.h"
#include "chrome/browser/apps/app_browsertest_util.h"
using extensions::Extension;
namespace apps {
namespace {
typedef extensions::PlatformAppBrowserTest AppWindowBrowserTest;
#if defined(TOOLKIT_GTK) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
#define MAYBE_FrameInsetsForDefaultFrame DISABLED_FrameInsetsForDefaultFrame
#else
#define MAYBE_FrameInsetsForDefaultFrame FrameInsetsForDefaultFrame
#endif
IN_PROC_BROWSER_TEST_F(AppWindowBrowserTest, MAYBE_FrameInsetsForDefaultFrame) {
AppWindow* app_window = CreateTestAppWindow("{}");
NativeAppWindow* native_window = app_window->GetBaseWindow();
gfx::Insets insets = native_window->GetFrameInsets();
EXPECT_GT(insets.top(), insets.bottom());
CloseAppWindow(app_window);
}
#if defined(TOOLKIT_GTK) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
#define MAYBE_FrameInsetsForColoredFrame DISABLED_FrameInsetsForColoredFrame
#else
#define MAYBE_FrameInsetsForColoredFrame FrameInsetsForColoredFrame
#endif
IN_PROC_BROWSER_TEST_F(AppWindowBrowserTest, MAYBE_FrameInsetsForColoredFrame) {
AppWindow* app_window =
CreateTestAppWindow("{ \"frame\": { \"color\": \"#ffffff\" } }");
NativeAppWindow* native_window = app_window->GetBaseWindow();
gfx::Insets insets = native_window->GetFrameInsets();
EXPECT_GT(insets.top(), insets.bottom());
CloseAppWindow(app_window);
}
IN_PROC_BROWSER_TEST_F(AppWindowBrowserTest, FrameInsetsForNoFrame) {
AppWindow* app_window = CreateTestAppWindow("{ \"frame\": \"none\" }");
NativeAppWindow* native_window = app_window->GetBaseWindow();
gfx::Insets insets = native_window->GetFrameInsets();
EXPECT_EQ(0, insets.top());
EXPECT_EQ(0, insets.bottom());
EXPECT_EQ(0, insets.left());
EXPECT_EQ(0, insets.right());
CloseAppWindow(app_window);
}
}
}