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

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

Issue 1839643009: RELEASE_ASSERT -> CHECK and ASSERT -> DCHECK in web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return DCHECK_IS_ON checks. 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 }; 72 };
73 73
74 void WebElementTest::insertHTML(String html) 74 void WebElementTest::insertHTML(String html)
75 { 75 {
76 document().documentElement()->setInnerHTML(html, ASSERT_NO_EXCEPTION); 76 document().documentElement()->setInnerHTML(html, ASSERT_NO_EXCEPTION);
77 } 77 }
78 78
79 WebElement WebElementTest::testElement() 79 WebElement WebElementTest::testElement()
80 { 80 {
81 Element* element = document().getElementById("testElement"); 81 Element* element = document().getElementById("testElement");
82 ASSERT(element); 82 DCHECK(element);
83 return WebElement(element); 83 return WebElement(element);
84 } 84 }
85 85
86 void WebElementTest::SetUp() 86 void WebElementTest::SetUp()
87 { 87 {
88 m_pageHolder = DummyPageHolder::create(IntSize(800, 600)); 88 m_pageHolder = DummyPageHolder::create(IntSize(800, 600));
89 } 89 }
90 90
91 TEST_F(WebElementTest, HasNonEmptyLayoutSize) 91 TEST_F(WebElementTest, HasNonEmptyLayoutSize)
92 { 92 {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/WebDocument.cpp ('k') | third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698