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

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

Issue 438843004: Move the user agent styles sheets to blink_resources.grd (Part 3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased patch Created 6 years, 3 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 | « Source/core/rendering/RenderThemeChromiumSkia.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 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 32
33 #include "public/web/WebFrame.h" 33 #include "public/web/WebFrame.h"
34 34
35 #include "SkBitmap.h" 35 #include "SkBitmap.h"
36 #include "SkCanvas.h" 36 #include "SkCanvas.h"
37 #include "core/UserAgentStyleSheets.h"
38 #include "core/clipboard/DataTransfer.h" 37 #include "core/clipboard/DataTransfer.h"
39 #include "core/css/StyleSheetContents.h" 38 #include "core/css/StyleSheetContents.h"
40 #include "core/css/resolver/StyleResolver.h" 39 #include "core/css/resolver/StyleResolver.h"
41 #include "core/css/resolver/ViewportStyleResolver.h" 40 #include "core/css/resolver/ViewportStyleResolver.h"
42 #include "core/dom/DocumentMarkerController.h" 41 #include "core/dom/DocumentMarkerController.h"
43 #include "core/dom/Fullscreen.h" 42 #include "core/dom/Fullscreen.h"
44 #include "core/dom/NodeRenderStyle.h" 43 #include "core/dom/NodeRenderStyle.h"
45 #include "core/dom/Range.h" 44 #include "core/dom/Range.h"
46 #include "core/editing/Editor.h" 45 #include "core/editing/Editor.h"
47 #include "core/editing/FrameSelection.h" 46 #include "core/editing/FrameSelection.h"
(...skipping 10 matching lines...) Expand all
58 #include "core/loader/DocumentThreadableLoaderClient.h" 57 #include "core/loader/DocumentThreadableLoaderClient.h"
59 #include "core/loader/FrameLoadRequest.h" 58 #include "core/loader/FrameLoadRequest.h"
60 #include "core/loader/ThreadableLoader.h" 59 #include "core/loader/ThreadableLoader.h"
61 #include "core/page/EventHandler.h" 60 #include "core/page/EventHandler.h"
62 #include "core/page/Page.h" 61 #include "core/page/Page.h"
63 #include "core/rendering/HitTestResult.h" 62 #include "core/rendering/HitTestResult.h"
64 #include "core/rendering/RenderView.h" 63 #include "core/rendering/RenderView.h"
65 #include "core/rendering/compositing/RenderLayerCompositor.h" 64 #include "core/rendering/compositing/RenderLayerCompositor.h"
66 #include "core/testing/URLTestHelpers.h" 65 #include "core/testing/URLTestHelpers.h"
67 #include "platform/DragImage.h" 66 #include "platform/DragImage.h"
67 #include "platform/PlatformResourceLoader.h"
68 #include "platform/RuntimeEnabledFeatures.h" 68 #include "platform/RuntimeEnabledFeatures.h"
69 #include "platform/UserGestureIndicator.h" 69 #include "platform/UserGestureIndicator.h"
70 #include "platform/geometry/FloatRect.h" 70 #include "platform/geometry/FloatRect.h"
71 #include "platform/network/ResourceError.h" 71 #include "platform/network/ResourceError.h"
72 #include "platform/scroll/ScrollbarTheme.h" 72 #include "platform/scroll/ScrollbarTheme.h"
73 #include "platform/weborigin/SchemeRegistry.h" 73 #include "platform/weborigin/SchemeRegistry.h"
74 #include "public/platform/Platform.h" 74 #include "public/platform/Platform.h"
75 #include "public/platform/WebFloatRect.h" 75 #include "public/platform/WebFloatRect.h"
76 #include "public/platform/WebSelectionBound.h" 76 #include "public/platform/WebSelectionBound.h"
77 #include "public/platform/WebThread.h" 77 #include "public/platform/WebThread.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 void registerMockedChromeURLLoad(const std::string& fileName) 147 void registerMockedChromeURLLoad(const std::string& fileName)
148 { 148 {
149 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_chrom eURL.c_str()), WebString::fromUTF8(fileName.c_str())); 149 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_chrom eURL.c_str()), WebString::fromUTF8(fileName.c_str()));
150 } 150 }
151 151
152 void applyViewportStyleOverride(FrameTestHelpers::WebViewHelper* webViewHelp er) 152 void applyViewportStyleOverride(FrameTestHelpers::WebViewHelper* webViewHelp er)
153 { 153 {
154 RefPtrWillBeRawPtr<StyleSheetContents> styleSheet = StyleSheetContents:: create(CSSParserContext(UASheetMode, 0)); 154 RefPtrWillBeRawPtr<StyleSheetContents> styleSheet = StyleSheetContents:: create(CSSParserContext(UASheetMode, 0));
155 styleSheet->parseString(String(blink::viewportAndroidCss, sizeof(blink:: viewportAndroidCss))); 155 styleSheet->parseString(loadResourceAsASCIIString("viewportAndroid.css") );
156 OwnPtrWillBeRawPtr<RuleSet> ruleSet = RuleSet::create(); 156 OwnPtrWillBeRawPtr<RuleSet> ruleSet = RuleSet::create();
157 ruleSet->addRulesFromSheet(styleSheet.get(), MediaQueryEvaluator("screen ")); 157 ruleSet->addRulesFromSheet(styleSheet.get(), MediaQueryEvaluator("screen "));
158 158
159 Document* document = toLocalFrame(webViewHelper->webViewImpl()->page()-> mainFrame())->document(); 159 Document* document = toLocalFrame(webViewHelper->webViewImpl()->page()-> mainFrame())->document();
160 document->ensureStyleResolver().viewportStyleResolver()->collectViewport Rules(ruleSet.get(), ViewportStyleResolver::UserAgentOrigin); 160 document->ensureStyleResolver().viewportStyleResolver()->collectViewport Rules(ruleSet.get(), ViewportStyleResolver::UserAgentOrigin);
161 document->ensureStyleResolver().viewportStyleResolver()->resolve(); 161 document->ensureStyleResolver().viewportStyleResolver()->resolve();
162 } 162 }
163 163
164 static void configueCompositingWebView(WebSettings* settings) 164 static void configueCompositingWebView(WebSettings* settings)
165 { 165 {
(...skipping 6106 matching lines...) Expand 10 before | Expand all | Expand 10 after
6272 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6272 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6273 6273
6274 // Neither should a page reload. 6274 // Neither should a page reload.
6275 localFrame->reload(); 6275 localFrame->reload();
6276 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); 6276 EXPECT_EQ(4u, frameClient.provisionalLoadCount());
6277 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); 6277 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition());
6278 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6278 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6279 } 6279 }
6280 6280
6281 } // namespace 6281 } // namespace
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumSkia.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698