| Index: components/arc/arc_util_unittest.cc
|
| diff --git a/components/arc/arc_util_unittest.cc b/components/arc/arc_util_unittest.cc
|
| index a39c92bbc15000dd76a49158bd464bbb1174fa52..45edda4f122aea4157a8f0a519fae84fbab7cc60 100644
|
| --- a/components/arc/arc_util_unittest.cc
|
| +++ b/components/arc/arc_util_unittest.cc
|
| @@ -7,11 +7,14 @@
|
| #include <memory>
|
| #include <string>
|
|
|
| +#include "ash/shared/app_types.h"
|
| +#include "ash/wm_window.h"
|
| #include "base/command_line.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ptr_util.h"
|
| #include "base/test/scoped_feature_list.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| +#include "ui/aura/test/test_windows.h"
|
|
|
| namespace arc {
|
| namespace {
|
| @@ -163,5 +166,20 @@ TEST_F(ArcUtilTest, IsArcOptInVerificationDisabled) {
|
| EXPECT_TRUE(IsArcOptInVerificationDisabled());
|
| }
|
|
|
| +TEST_F(ArcUtilTest, IsArcAppWindow) {
|
| + std::unique_ptr<aura::Window> window(
|
| + aura::test::CreateTestWindowWithId(0, nullptr));
|
| + EXPECT_FALSE(IsArcAppWindow(window.get()));
|
| + ash::WmWindow* wm_window = ash::WmWindow::Get(window.get());
|
| + ASSERT_TRUE(wm_window);
|
| +
|
| + wm_window->SetAppType(static_cast<int>(ash::AppType::CHROME_APP));
|
| + EXPECT_FALSE(IsArcAppWindow(window.get()));
|
| + wm_window->SetAppType(static_cast<int>(ash::AppType::ARC_APP));
|
| + EXPECT_TRUE(IsArcAppWindow(window.get()));
|
| +
|
| + EXPECT_FALSE(IsArcAppWindow(nullptr));
|
| +}
|
| +
|
| } // namespace
|
| } // namespace arc
|
|
|