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

Side by Side Diff: trunk/Source/core/css/parser/MediaQueryTokenizerTest.cpp

Issue 196653020: Revert 169289 "A thread-safe Media Query Parser" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « trunk/Source/core/css/parser/MediaQueryTokenizer.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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "core/css/parser/MediaQueryTokenizer.h"
7
8 #include "wtf/PassOwnPtr.h"
9 #include <gtest/gtest.h>
10
11 namespace WebCore {
12
13 typedef pair<String, MediaQueryTokenType* > TestCase;
14 TEST(MediaQueryTokenizerTest, Basic)
15 {
16 Vector<TestCase> testcases;
17 MediaQueryTokenType tokenTypeArr[] = {LeftParenthesisToken, IdentToken, Colo nToken, WhitespaceToken, PercentageToken, RightParenthesisToken, EOFToken };
18 TestCase testCase1("(max-width: 50%)", (MediaQueryTokenType*)&tokenTypeArr);
19 testcases.append(testCase1);
20 Vector<MediaQueryToken> tokens;
21 MediaQueryTokenizer::tokenize(testcases[0].first, tokens);
22 for (size_t i = 0; i < tokens.size(); i++) {
23 ASSERT_EQ(testcases[0].second[i], tokens[i].type());
24 }
25 }
26
27 } // namespace
OLDNEW
« no previous file with comments | « trunk/Source/core/css/parser/MediaQueryTokenizer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698