| 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..d083927672ee8e2d7d0da772da36dc4313909378 100644
|
| --- a/components/arc/arc_util_unittest.cc
|
| +++ b/components/arc/arc_util_unittest.cc
|
| @@ -7,11 +7,15 @@
|
| #include <memory>
|
| #include <string>
|
|
|
| +#include "ash/shared/app_types.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/client/aura_constants.h"
|
| +#include "ui/aura/test/test_windows.h"
|
| +#include "ui/aura/window.h"
|
|
|
| namespace arc {
|
| namespace {
|
| @@ -163,5 +167,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()));
|
| +
|
| + window->SetProperty(aura::client::kAppType,
|
| + static_cast<int>(ash::AppType::CHROME_APP));
|
| + EXPECT_FALSE(IsArcAppWindow(window.get()));
|
| + window->SetProperty(aura::client::kAppType,
|
| + static_cast<int>(ash::AppType::ARC_APP));
|
| + EXPECT_TRUE(IsArcAppWindow(window.get()));
|
| +
|
| + EXPECT_FALSE(IsArcAppWindow(nullptr));
|
| +}
|
| +
|
| } // namespace
|
| } // namespace arc
|
|
|