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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 webViewHelper->webView()->settings()->setDefaultFontSize(12); 250 webViewHelper->webView()->settings()->setDefaultFontSize(12);
251 webViewHelper->resize(WebSize(640, 480)); 251 webViewHelper->resize(WebSize(640, 480));
252 } 252 }
253 253
254 PassOwnPtr<DragImage> nodeImageTestSetup(FrameTestHelpers::WebViewHelper* we bViewHelper, const std::string& testcase) 254 PassOwnPtr<DragImage> nodeImageTestSetup(FrameTestHelpers::WebViewHelper* we bViewHelper, const std::string& testcase)
255 { 255 {
256 registerMockedHttpURLLoad("nodeimage.html"); 256 registerMockedHttpURLLoad("nodeimage.html");
257 webViewHelper->initializeAndLoad(m_baseURL + "nodeimage.html"); 257 webViewHelper->initializeAndLoad(m_baseURL + "nodeimage.html");
258 webViewHelper->resize(WebSize(640, 480)); 258 webViewHelper->resize(WebSize(640, 480));
259 RawPtr<LocalFrame> frame = toLocalFrame(webViewHelper->webViewImpl()->pa ge()->mainFrame()); 259 RawPtr<LocalFrame> frame = toLocalFrame(webViewHelper->webViewImpl()->pa ge()->mainFrame());
260 ASSERT(frame); 260 DCHECK(frame);
261 Element* element = frame->document()->getElementById(testcase.c_str()); 261 Element* element = frame->document()->getElementById(testcase.c_str());
262 return frame->nodeImage(*element); 262 return frame->nodeImage(*element);
263 } 263 }
264 264
265 void removeElementById(WebLocalFrameImpl* frame, const AtomicString& id) 265 void removeElementById(WebLocalFrameImpl* frame, const AtomicString& id)
266 { 266 {
267 Element* element = frame->frame()->document()->getElementById(id); 267 Element* element = frame->frame()->document()->getElementById(id);
268 ASSERT(element); 268 DCHECK(element);
269 element->remove(); 269 element->remove();
270 } 270 }
271 271
272 std::string m_baseURL; 272 std::string m_baseURL;
273 std::string m_notBaseURL; 273 std::string m_notBaseURL;
274 std::string m_chromeURL; 274 std::string m_chromeURL;
275 }; 275 };
276 276
277 enum ParameterizedWebFrameTestConfig { 277 enum ParameterizedWebFrameTestConfig {
278 Default, 278 Default,
(...skipping 5686 matching lines...) Expand 10 before | Expand all | Expand 10 after
5965 { 5965 {
5966 } 5966 }
5967 5967
5968 void setChildWebFrameClient(TestCachePolicyWebFrameClient* client) { m_child Client = client; } 5968 void setChildWebFrameClient(TestCachePolicyWebFrameClient* client) { m_child Client = client; }
5969 WebURLRequest::CachePolicy getCachePolicy() const { return m_policy; } 5969 WebURLRequest::CachePolicy getCachePolicy() const { return m_policy; }
5970 int willSendRequestCallCount() const { return m_willSendRequestCallCount; } 5970 int willSendRequestCallCount() const { return m_willSendRequestCallCount; }
5971 int childFrameCreationCount() const { return m_childFrameCreationCount; } 5971 int childFrameCreationCount() const { return m_childFrameCreationCount; }
5972 5972
5973 virtual WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType s cope, const WebString&, const WebString&, WebSandboxFlags, const WebFrameOwnerPr operties& frameOwnerProperties) 5973 virtual WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType s cope, const WebString&, const WebString&, WebSandboxFlags, const WebFrameOwnerPr operties& frameOwnerProperties)
5974 { 5974 {
5975 ASSERT(m_childClient); 5975 DCHECK(m_childClient);
5976 m_childFrameCreationCount++; 5976 m_childFrameCreationCount++;
5977 WebFrame* frame = WebLocalFrame::create(scope, m_childClient); 5977 WebFrame* frame = WebLocalFrame::create(scope, m_childClient);
5978 parent->appendChild(frame); 5978 parent->appendChild(frame);
5979 return frame; 5979 return frame;
5980 } 5980 }
5981 5981
5982 virtual void didStartLoading(bool toDifferentDocument) 5982 virtual void didStartLoading(bool toDifferentDocument)
5983 { 5983 {
5984 if (m_parentClient) { 5984 if (m_parentClient) {
5985 m_parentClient->didStartLoading(toDifferentDocument); 5985 m_parentClient->didStartLoading(toDifferentDocument);
(...skipping 2513 matching lines...) Expand 10 before | Expand all | Expand 10 after
8499 } 8499 }
8500 8500
8501 TEST_F(WebFrameVisibilityChangeTest, RemoteFrameParentVisibilityChange) 8501 TEST_F(WebFrameVisibilityChangeTest, RemoteFrameParentVisibilityChange)
8502 { 8502 {
8503 swapLocalFrameToRemoteFrame(); 8503 swapLocalFrameToRemoteFrame();
8504 executeScriptOnMainFrame(WebScriptSource("document.querySelector('iframe').p arentElement.style.display = 'none';")); 8504 executeScriptOnMainFrame(WebScriptSource("document.querySelector('iframe').p arentElement.style.display = 'none';"));
8505 EXPECT_FALSE(remoteFrameClient()->isVisible()); 8505 EXPECT_FALSE(remoteFrameClient()->isVisible());
8506 } 8506 }
8507 8507
8508 } // namespace blink 8508 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698