1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 #include "core/html/HTMLInputElement.h"
8 #include "core/dom/Document.h"
9 #include <gtest/gtest.h>
13 TEST(HTMLInputElementTest
, create
)
15 const RefPtrWillBeRawPtr
<Document
> document
= Document::create();
16 RefPtrWillBeRawPtr
<HTMLInputElement
> input
= HTMLInputElement::create(*document
, nullptr, /* createdByParser */ false);
17 EXPECT_NE(nullptr, input
->userAgentShadowRoot());
19 input
= HTMLInputElement::create(*document
, nullptr, /* createdByParser */ true);
20 EXPECT_EQ(nullptr, input
->userAgentShadowRoot());
21 input
->parserSetAttributes(Vector
<Attribute
>());
22 EXPECT_NE(nullptr, input
->userAgentShadowRoot());