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

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

Issue 1865813002: Remove RawPtr from Source/web/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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 "public/web/WebElement.h" 5 #include "public/web/WebElement.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
9 #include "core/dom/shadow/ShadowRoot.h" 9 #include "core/dom/shadow/ShadowRoot.h"
10 #include "core/testing/DummyPageHolder.h" 10 #include "core/testing/DummyPageHolder.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 insertHTML(s_blockWithInlines); 108 insertHTML(s_blockWithInlines);
109 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize()); 109 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize());
110 110
111 insertHTML(s_blockWithContent); 111 insertHTML(s_blockWithContent);
112 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize()); 112 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize());
113 113
114 insertHTML(s_blockWithText); 114 insertHTML(s_blockWithText);
115 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize()); 115 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize());
116 116
117 insertHTML(s_emptyBlock); 117 insertHTML(s_emptyBlock);
118 RawPtr<ShadowRoot> root = document().getElementById("testElement")->createSh adowRootInternal(ShadowRootType::V0, ASSERT_NO_EXCEPTION); 118 ShadowRoot* root = document().getElementById("testElement")->createShadowRoo tInternal(ShadowRootType::V0, ASSERT_NO_EXCEPTION);
119 root->setInnerHTML("<div>Hello World</div>", ASSERT_NO_EXCEPTION); 119 root->setInnerHTML("<div>Hello World</div>", ASSERT_NO_EXCEPTION);
120 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize()); 120 EXPECT_TRUE(testElement().hasNonEmptyLayoutSize());
121 } 121 }
122 122
123 TEST_F(WebElementTest, IsEditable) 123 TEST_F(WebElementTest, IsEditable)
124 { 124 {
125 insertHTML("<div id=testElement></div>"); 125 insertHTML("<div id=testElement></div>");
126 EXPECT_FALSE(testElement().isEditable()); 126 EXPECT_FALSE(testElement().isEditable());
127 127
128 insertHTML("<div id=testElement contenteditable=true></div>"); 128 insertHTML("<div id=testElement contenteditable=true></div>");
(...skipping 20 matching lines...) Expand all
149 EXPECT_FALSE(testElement().isEditable()); 149 EXPECT_FALSE(testElement().isEditable());
150 150
151 insertHTML("<input id=testElement disabled>"); 151 insertHTML("<input id=testElement disabled>");
152 EXPECT_FALSE(testElement().isEditable()); 152 EXPECT_FALSE(testElement().isEditable());
153 153
154 insertHTML("<fieldset disabled><div><input id=testElement></div></fieldset>" ); 154 insertHTML("<fieldset disabled><div><input id=testElement></div></fieldset>" );
155 EXPECT_FALSE(testElement().isEditable()); 155 EXPECT_FALSE(testElement().isEditable());
156 } 156 }
157 157
158 } // namespace blink 158 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebElementCollection.cpp ('k') | third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698