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

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/CSSTokenStreamValueTest.cpp

Issue 2122193003: [Typed-OM] Add CSSTokenStreamValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test for CSSTokenStreamValue Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSTokenStreamValue.idl ('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 2016 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 "core/css/cssom/CSSTokenStreamValue.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace blink {
10
11 namespace {
12
13 CSSTokenStreamValue* tokenStreamValueFromString(String str)
14 {
15 Vector<String> fragments;
16 fragments.append(str);
17 return CSSTokenStreamValue::create(fragments);
18 }
19
20 TEST(CSSTokenStreamValueTest, EmptyList)
21 {
22 Vector<String> fragments;
23
24 CSSTokenStreamValue* tokenStreamValue = CSSTokenStreamValue::create(fragment s);
25
26 EXPECT_EQ(tokenStreamValue->size(), 0UL);
27 }
28
29 TEST(CSSTokenStreamValueTest, ListOfString)
30 {
31 CSSTokenStreamValue* tokenStreamValue = tokenStreamValueFromString("Str");
32
33 EXPECT_EQ(tokenStreamValue->size(), 1UL);
34 EXPECT_EQ(tokenStreamValue->fragmentAtIndex(0), "Str");
35 }
36
37 } // namespace
38
39 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSTokenStreamValue.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698