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

Unified Diff: Source/core/css/MediaQueryEvaluatorTest.cpp

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased upto r183571 Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/MediaQueryEvaluatorTest.cpp
diff --git a/Source/core/css/MediaQueryEvaluatorTest.cpp b/Source/core/css/MediaQueryEvaluatorTest.cpp
index d72278ef72b31239291eb539b2d6cd8a36e66962..5b9ce59ee4032f99699c36f99ec3a501431d8f8a 100644
--- a/Source/core/css/MediaQueryEvaluatorTest.cpp
+++ b/Source/core/css/MediaQueryEvaluatorTest.cpp
@@ -84,8 +84,9 @@ TestCase printTestCases[] = {
void testMQEvaluator(TestCase* testCases, const MediaQueryEvaluator& mediaQueryEvaluator)
{
+ RefPtrWillBePersistent<MediaQuerySet> querySet = nullptr;
for (unsigned i = 0; testCases[i].input; ++i) {
- RefPtrWillBeRawPtr<MediaQuerySet> querySet = MediaQuerySet::create(testCases[i].input);
+ querySet = MediaQuerySet::create(testCases[i].input);
ASSERT_EQ(testCases[i].output, mediaQueryEvaluator.eval(querySet.get()));
}
}
@@ -132,10 +133,10 @@ TEST(MediaQueryEvaluatorTest, Dynamic)
TEST(MediaQueryEvaluatorTest, DynamicNoView)
{
OwnPtr<DummyPageHolder> pageHolder = DummyPageHolder::create(IntSize(500, 500));
- RefPtr<FrameView> view = pageHolder->frame().view();
+ RefPtrWillBePersistent<FrameView> view = pageHolder->frame().view();
pageHolder->frame().setView(nullptr);
MediaQueryEvaluator mediaQueryEvaluator(&pageHolder->frame());
- RefPtrWillBeRawPtr<MediaQuerySet> querySet = MediaQuerySet::create("foobar");
+ RefPtrWillBePersistent<MediaQuerySet> querySet = MediaQuerySet::create("foobar");
bool output = false;
ASSERT_EQ(output, mediaQueryEvaluator.eval(querySet.get()));
pageHolder->frame().setView(view);

Powered by Google App Engine
This is Rietveld 408576698