flutter_flutter/engine/core/css/MediaQueryMatcherTest.cpp
Eric Seidel 55b5bc485d Sort headers
Fix (most) generated includes to have gen/ in their path.

This makes it easier to tell where files exist on disk.

Unfortunately I had to leave the old include path
in engine/BUILD.gn to support all the v8 includes
which were too many to deal with in this patch.

It's a little nasty to have the raw build directory
in our include path, but it produces nicer paths.

R=abarth@chromium.org
2014-11-19 12:33:42 -08:00

28 lines
843 B
C++

// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#include "core/css/MediaQueryMatcher.h"
#include "gen/sky/core/MediaTypeNames.h"
#include "core/css/MediaList.h"
#include "core/testing/DummyPageHolder.h"
#include <gtest/gtest.h>
namespace blink {
TEST(MediaQueryMatcherTest, LostFrame)
{
OwnPtr<DummyPageHolder> pageHolder = DummyPageHolder::create(IntSize(500, 500));
RefPtr<MediaQueryMatcher> matcher = MediaQueryMatcher::create(pageHolder->document());
RefPtr<MediaQuerySet> querySet = MediaQuerySet::create(MediaTypeNames::all);
ASSERT_TRUE(matcher->evaluate(querySet.get()));
matcher->documentDetached();
ASSERT_FALSE(matcher->evaluate(querySet.get()));
}
} // namespace