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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2101143005: 0 -> nullptr for UseCounter pointer in CSSParserContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/web/WebDocument.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 URLTestHelpers::registerMockedURLLoadWithCustomResponse(toKURL(fullStrin g.c_str()), WebString::fromUTF8(fileName.c_str()), WebString::fromUTF8(""), resp onse); 215 URLTestHelpers::registerMockedURLLoadWithCustomResponse(toKURL(fullStrin g.c_str()), WebString::fromUTF8(fileName.c_str()), WebString::fromUTF8(""), resp onse);
216 } 216 }
217 217
218 void registerMockedHttpURLLoadWithMimeType(const std::string& fileName, cons t std::string& mimeType) 218 void registerMockedHttpURLLoadWithMimeType(const std::string& fileName, cons t std::string& mimeType)
219 { 219 {
220 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL.c_str()), WebString::fromUTF8(fileName.c_str()), WebString::fromUTF8(mimeType )); 220 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL.c_str()), WebString::fromUTF8(fileName.c_str()), WebString::fromUTF8(mimeType ));
221 } 221 }
222 222
223 void applyViewportStyleOverride(FrameTestHelpers::WebViewHelper* webViewHelp er) 223 void applyViewportStyleOverride(FrameTestHelpers::WebViewHelper* webViewHelp er)
224 { 224 {
225 StyleSheetContents* styleSheet = StyleSheetContents::create(CSSParserCon text(UASheetMode, 0)); 225 StyleSheetContents* styleSheet = StyleSheetContents::create(CSSParserCon text(UASheetMode, nullptr));
226 styleSheet->parseString(loadResourceAsASCIIString("viewportAndroid.css") ); 226 styleSheet->parseString(loadResourceAsASCIIString("viewportAndroid.css") );
227 RuleSet* ruleSet = RuleSet::create(); 227 RuleSet* ruleSet = RuleSet::create();
228 ruleSet->addRulesFromSheet(styleSheet, MediaQueryEvaluator("screen")); 228 ruleSet->addRulesFromSheet(styleSheet, MediaQueryEvaluator("screen"));
229 229
230 Document* document = toLocalFrame(webViewHelper->webViewImpl()->page()-> mainFrame())->document(); 230 Document* document = toLocalFrame(webViewHelper->webViewImpl()->page()-> mainFrame())->document();
231 document->ensureStyleResolver().viewportStyleResolver()->collectViewport Rules(ruleSet, ViewportStyleResolver::UserAgentOrigin); 231 document->ensureStyleResolver().viewportStyleResolver()->collectViewport Rules(ruleSet, ViewportStyleResolver::UserAgentOrigin);
232 document->ensureStyleResolver().viewportStyleResolver()->resolve(); 232 document->ensureStyleResolver().viewportStyleResolver()->resolve();
233 } 233 }
234 234
235 static void configueCompositingWebView(WebSettings* settings) 235 static void configueCompositingWebView(WebSettings* settings)
(...skipping 8576 matching lines...) Expand 10 before | Expand all | Expand 10 after
8812 request.setURL(toKURL("javascript:location='" + redirectURL + "'")); 8812 request.setURL(toKURL("javascript:location='" + redirectURL + "'"));
8813 helper.webViewImpl()->mainFrame()->toWebLocalFrame()->loadRequest(request); 8813 helper.webViewImpl()->mainFrame()->toWebLocalFrame()->loadRequest(request);
8814 8814
8815 // Normally, the result of the JS url replaces the existing contents on the 8815 // Normally, the result of the JS url replaces the existing contents on the
8816 // Document. However, if the JS triggers a navigation, the contents should 8816 // Document. However, if the JS triggers a navigation, the contents should
8817 // not be replaced. 8817 // not be replaced.
8818 EXPECT_EQ("", toLocalFrame(helper.webViewImpl()->page()->mainFrame())->docum ent()->documentElement()->innerText()); 8818 EXPECT_EQ("", toLocalFrame(helper.webViewImpl()->page()->mainFrame())->docum ent()->documentElement()->innerText());
8819 } 8819 }
8820 8820
8821 } // namespace blink 8821 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebDocument.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698