| Index: Source/web/tests/WebScopedWindowFocusAllowedIndicatorTest.cpp
|
| diff --git a/Source/web/tests/WebScopedWindowFocusAllowedIndicatorTest.cpp b/Source/web/tests/WebScopedWindowFocusAllowedIndicatorTest.cpp
|
| index ac7f0f1f87305fb9e112e22bc84577c0136769e2..970a542ab0fde1cd025bb0488307c6f49ce64818 100644
|
| --- a/Source/web/tests/WebScopedWindowFocusAllowedIndicatorTest.cpp
|
| +++ b/Source/web/tests/WebScopedWindowFocusAllowedIndicatorTest.cpp
|
| @@ -31,10 +31,11 @@
|
| #include "config.h"
|
| #include "public/web/WebScopedWindowFocusAllowedIndicator.h"
|
|
|
| +#include "core/dom/Document.h"
|
| #include "core/page/WindowFocusAllowedIndicator.h"
|
| +#include "public/web/WebDocument.h"
|
| #include <gtest/gtest.h>
|
|
|
| -
|
| using namespace blink;
|
|
|
| namespace {
|
| @@ -54,4 +55,22 @@ TEST(WebScopedWindowFocusAllowedIndicatorTest, Basic)
|
| EXPECT_FALSE(WindowFocusAllowedIndicator::windowFocusAllowed());
|
| }
|
|
|
| +TEST(WebScopedWindowFocusAllowedIndicatorTest, WithDocument)
|
| +{
|
| + RefPtrWillBePersistent<Document> document = Document::create();
|
| + WebDocument webDocument(document);
|
| +
|
| + EXPECT_FALSE(document->isWindowFocusAllowed());
|
| + {
|
| + WebScopedWindowFocusAllowedIndicator indicator1(&webDocument);
|
| + EXPECT_TRUE(document->isWindowFocusAllowed());
|
| + {
|
| + WebScopedWindowFocusAllowedIndicator indicator2(&webDocument);
|
| + EXPECT_TRUE(document->isWindowFocusAllowed());
|
| + }
|
| + EXPECT_TRUE(document->isWindowFocusAllowed());
|
| + }
|
| + EXPECT_FALSE(document->isWindowFocusAllowed());
|
| +}
|
| +
|
| }
|
|
|