OLD | NEW |
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/parser/MediaQueryTokenizer.h" | 6 #include "core/css/parser/MediaQueryTokenizer.h" |
7 | 7 |
8 #include "wtf/PassOwnPtr.h" | 8 #include "wtf/PassOwnPtr.h" |
9 #include <gtest/gtest.h> | 9 #include <gtest/gtest.h> |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 else if (isASCIIAlpha(c)) | 59 else if (isASCIIAlpha(c)) |
60 testToken(c, IdentToken); | 60 testToken(c, IdentToken); |
61 else if (c == '_') | 61 else if (c == '_') |
62 testToken(c, IdentToken); | 62 testToken(c, IdentToken); |
63 else if (c == '\r' || c == ' ' || c == '\n' || c == '\t' || c == '\f') | 63 else if (c == '\r' || c == ' ' || c == '\n' || c == '\t' || c == '\f') |
64 testToken(c, WhitespaceToken); | 64 testToken(c, WhitespaceToken); |
65 else if (c == '(') | 65 else if (c == '(') |
66 testToken(c, LeftParenthesisToken); | 66 testToken(c, LeftParenthesisToken); |
67 else if (c == ')') | 67 else if (c == ')') |
68 testToken(c, RightParenthesisToken); | 68 testToken(c, RightParenthesisToken); |
| 69 else if (c == '[') |
| 70 testToken(c, LeftBracketToken); |
| 71 else if (c == ']') |
| 72 testToken(c, RightBracketToken); |
| 73 else if (c == '{') |
| 74 testToken(c, LeftBraceToken); |
| 75 else if (c == '}') |
| 76 testToken(c, RightBraceToken); |
69 else if (c == '.' || c == '+' || c == '-' || c == '/' || c == '\\') | 77 else if (c == '.' || c == '+' || c == '-' || c == '/' || c == '\\') |
70 testToken(c, DelimiterToken); | 78 testToken(c, DelimiterToken); |
71 else if (c == ',') | 79 else if (c == ',') |
72 testToken(c, CommaToken); | 80 testToken(c, CommaToken); |
73 else if (c == ':') | 81 else if (c == ':') |
74 testToken(c, ColonToken); | 82 testToken(c, ColonToken); |
75 else if (c == ';') | 83 else if (c == ';') |
76 testToken(c, SemicolonToken); | 84 testToken(c, SemicolonToken); |
77 else if (!c) | 85 else if (!c) |
78 testToken(c, EOFToken); | 86 testToken(c, EOFToken); |
79 else if (c > SCHAR_MAX) | 87 else if (c > SCHAR_MAX) |
80 testToken(c, IdentToken); | 88 testToken(c, IdentToken); |
81 else | 89 else |
82 testToken(c, DelimiterToken); | 90 testToken(c, DelimiterToken); |
83 } | 91 } |
84 testToken(USHRT_MAX, IdentToken); | 92 testToken(USHRT_MAX, IdentToken); |
85 } | 93 } |
86 | 94 |
87 } // namespace | 95 } // namespace |
OLD | NEW |