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

Side by Side Diff: Source/core/css/MediaQueryEvaluatorTest.cpp

Issue 1260403002: Oilpan: Remove raw pointer to LocalFrame from MediaValuesDynamic (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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/css/MediaQueryEvaluator.h ('k') | Source/core/css/MediaValues.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "core/css/MediaQueryEvaluator.h" 6 #include "core/css/MediaQueryEvaluator.h"
7 7
8 #include "core/MediaTypeNames.h" 8 #include "core/MediaTypeNames.h"
9 #include "core/css/MediaList.h" 9 #include "core/css/MediaList.h"
10 #include "core/css/MediaValuesCached.h" 10 #include "core/css/MediaValuesCached.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 data.devicePixelRatio = 2.0; 119 data.devicePixelRatio = 2.0;
120 data.colorBitsPerComponent = 24; 120 data.colorBitsPerComponent = 24;
121 data.monochromeBitsPerComponent = 0; 121 data.monochromeBitsPerComponent = 0;
122 data.primaryPointerType = PointerTypeFine; 122 data.primaryPointerType = PointerTypeFine;
123 data.primaryHoverType = HoverTypeHover; 123 data.primaryHoverType = HoverTypeHover;
124 data.defaultFontSize = 16; 124 data.defaultFontSize = 16;
125 data.threeDEnabled = true; 125 data.threeDEnabled = true;
126 data.mediaType = MediaTypeNames::screen; 126 data.mediaType = MediaTypeNames::screen;
127 data.strictMode = true; 127 data.strictMode = true;
128 data.displayMode = WebDisplayModeBrowser; 128 data.displayMode = WebDisplayModeBrowser;
129 RefPtr<MediaValues> mediaValues = MediaValuesCached::create(data); 129 RefPtrWillBeRawPtr<MediaValues> mediaValues = MediaValuesCached::create(data );
130 130
131 MediaQueryEvaluator mediaQueryEvaluator(*mediaValues); 131 MediaQueryEvaluator mediaQueryEvaluator(*mediaValues);
132 testMQEvaluator(screenTestCases, mediaQueryEvaluator); 132 testMQEvaluator(screenTestCases, mediaQueryEvaluator);
133 testMQEvaluator(viewportTestCases, mediaQueryEvaluator); 133 testMQEvaluator(viewportTestCases, mediaQueryEvaluator);
134 134
135 data.mediaType = MediaTypeNames::print; 135 data.mediaType = MediaTypeNames::print;
136 mediaValues = MediaValuesCached::create(data); 136 mediaValues = MediaValuesCached::create(data);
137 MediaQueryEvaluator printMediaQueryEvaluator(*mediaValues); 137 MediaQueryEvaluator printMediaQueryEvaluator(*mediaValues);
138 testMQEvaluator(printTestCases, printMediaQueryEvaluator); 138 testMQEvaluator(printTestCases, printMediaQueryEvaluator);
139 } 139 }
(...skipping 14 matching lines...) Expand all
154 OwnPtr<DummyPageHolder> pageHolder = DummyPageHolder::create(IntSize(500, 50 0)); 154 OwnPtr<DummyPageHolder> pageHolder = DummyPageHolder::create(IntSize(500, 50 0));
155 RefPtrWillBeRawPtr<LocalFrame> frame = &pageHolder->frame(); 155 RefPtrWillBeRawPtr<LocalFrame> frame = &pageHolder->frame();
156 pageHolder.clear(); 156 pageHolder.clear();
157 ASSERT_EQ(nullptr, frame->view()); 157 ASSERT_EQ(nullptr, frame->view());
158 MediaQueryEvaluator mediaQueryEvaluator(frame.get()); 158 MediaQueryEvaluator mediaQueryEvaluator(frame.get());
159 RefPtrWillBeRawPtr<MediaQuerySet> querySet = MediaQuerySet::create("foobar") ; 159 RefPtrWillBeRawPtr<MediaQuerySet> querySet = MediaQuerySet::create("foobar") ;
160 EXPECT_FALSE(mediaQueryEvaluator.eval(querySet.get())); 160 EXPECT_FALSE(mediaQueryEvaluator.eval(querySet.get()));
161 } 161 }
162 162
163 } // namespace 163 } // namespace
OLDNEW
« no previous file with comments | « Source/core/css/MediaQueryEvaluator.h ('k') | Source/core/css/MediaValues.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698