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

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

Issue 240063003: Revert "A sizes attribute parser" (https://codereview.chromium.org/224733011) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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
« no previous file with comments | « Source/core/css/MediaQueryEvaluator.cpp ('k') | Source/core/css/MediaQueryExp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/MediaQueryEvaluatorTest.cpp
diff --git a/Source/core/css/MediaQueryEvaluatorTest.cpp b/Source/core/css/MediaQueryEvaluatorTest.cpp
index db735570592d6e443498bf194fe855dccf9e94db..3d0d07d8ef2f84d63cf8e36caf55f3b81d407c61 100644
--- a/Source/core/css/MediaQueryEvaluatorTest.cpp
+++ b/Source/core/css/MediaQueryEvaluatorTest.cpp
@@ -6,7 +6,7 @@
#include "core/css/MediaQueryEvaluator.h"
#include "core/css/MediaList.h"
-#include "core/css/MediaValuesCached.h"
+#include "core/css/MediaValues.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/text/StringBuilder.h"
@@ -25,8 +25,6 @@ TEST(MediaQueryEvaluatorTest, Basic)
// The second string represents the output string, if present.
// Otherwise, the output string is identical to the first string.
TestCase screenTestCases[] = {
- {"", 1},
- {" ", 1},
{"screen", 1},
{"screen and (color)", 1},
{"all and (min-width: 500px)", 1},
@@ -70,26 +68,22 @@ TEST(MediaQueryEvaluatorTest, Basic)
{0, 0} // Do not remove the terminator line.
};
- MediaValuesCached::MediaValuesCachedData data;
- data.viewportWidth = 500;
- data.viewportHeight = 500;
- data.deviceWidth = 500;
- data.deviceHeight = 500;
- data.devicePixelRatio = 2.0;
- data.colorBitsPerComponent = 24;
- data.monochromeBitsPerComponent = 0;
- data.pointer = MediaValues::MousePointer;
- data.defaultFontSize = 16;
- data.computedFontSize = 16;
- data.hasXHeight = true;
- data.xHeight = 16;
- data.zeroWidth = 16;
- data.threeDEnabled = true;
- data.scanMediaType = false;
- data.screenMediaType = true;
- data.printMediaType = false;
- data.strictMode = true;
- RefPtr<MediaValues> mediaValues = MediaValuesCached::create(data);
+ RefPtr<MediaValues> mediaValues = MediaValues::create(MediaValues::CachingMode,
+ 500, // Viewport Width
+ 500, // Viewport height
+ 500, // Device Width
+ 500, // Device Height
+ 2.0, // Device pixel ratio
+ 24, // Color bits per component
+ 0, // Monochrome bits per component
+ MediaValues::MousePointer, // Pointer device
+ 16, // Default font size
+ true, // 3D enabled
+ false, // scan media type
+ true, // screen media type
+ false, // print media type
+ true // Strict mode
+ );
for (unsigned i = 0; screenTestCases[i].input; ++i) {
RefPtrWillBeRawPtr<MediaQuerySet> querySet = MediaQuerySet::create(screenTestCases[i].input);
« no previous file with comments | « Source/core/css/MediaQueryEvaluator.cpp ('k') | Source/core/css/MediaQueryExp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698