Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/Source/web/WebElementTest.cpp

Issue 1407183002: Rename ShadowRootType::OpenByDefault to ShadowRootType::V0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v1-attach-shadow
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "public/web/WebElement.h" 6 #include "public/web/WebElement.h"
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/Element.h" 9 #include "core/dom/Element.h"
10 #include "core/dom/shadow/ShadowRoot.h" 10 #include "core/dom/shadow/ShadowRoot.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 insertHTML(s_blockWithInlines); 109 insertHTML(s_blockWithInlines);
110 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize()); 110 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize());
111 111
112 insertHTML(s_blockWithContent); 112 insertHTML(s_blockWithContent);
113 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize()); 113 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize());
114 114
115 insertHTML(s_blockWithText); 115 insertHTML(s_blockWithText);
116 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize()); 116 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize());
117 117
118 insertHTML(s_emptyBlock); 118 insertHTML(s_emptyBlock);
119 RefPtrWillBeRawPtr<ShadowRoot> root = document().getElementById("testElement ")->createShadowRootInternal(ShadowRootType::OpenByDefault, ASSERT_NO_EXCEPTION) ; 119 RefPtrWillBeRawPtr<ShadowRoot> root = document().getElementById("testElement ")->createShadowRootInternal(ShadowRootType::V0, ASSERT_NO_EXCEPTION);
120 root->setInnerHTML("<div>Hello World</div>", ASSERT_NO_EXCEPTION); 120 root->setInnerHTML("<div>Hello World</div>", ASSERT_NO_EXCEPTION);
121 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize()); 121 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize());
122 } 122 }
123 123
124 TEST_F(WebElementTest, IsEditable) 124 TEST_F(WebElementTest, IsEditable)
125 { 125 {
126 insertHTML("<div id=testElement></div>"); 126 insertHTML("<div id=testElement></div>");
127 EXPECT_FALSE(testElement().isEditable()); 127 EXPECT_FALSE(testElement().isEditable());
128 128
129 insertHTML("<div id=testElement contenteditable=true></div>"); 129 insertHTML("<div id=testElement contenteditable=true></div>");
(...skipping 20 matching lines...) Expand all
150 EXPECT_FALSE(testElement().isEditable()); 150 EXPECT_FALSE(testElement().isEditable());
151 151
152 insertHTML("<input id=testElement disabled>"); 152 insertHTML("<input id=testElement disabled>");
153 EXPECT_FALSE(testElement().isEditable()); 153 EXPECT_FALSE(testElement().isEditable());
154 154
155 insertHTML("<fieldset disabled><div><input id=testElement></div></fieldset>" ); 155 insertHTML("<fieldset disabled><div><input id=testElement></div></fieldset>" );
156 EXPECT_FALSE(testElement().isEditable()); 156 EXPECT_FALSE(testElement().isEditable());
157 } 157 }
158 158
159 } // namespace blink 159 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.cpp ('k') | third_party/WebKit/Source/web/tests/TextFinderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698