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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/MediaConditionTest.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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
OLDNEW
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 "core/css/MediaList.h" 5 #include "core/css/MediaList.h"
6 #include "core/css/MediaQuery.h" 6 #include "core/css/MediaQuery.h"
7 #include "core/css/parser/CSSTokenizer.h" 7 #include "core/css/parser/CSSTokenizer.h"
8 #include "core/css/parser/MediaQueryParser.h" 8 #include "core/css/parser/MediaQueryParser.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "wtf/PassOwnPtr.h"
11 #include "wtf/text/StringBuilder.h" 10 #include "wtf/text/StringBuilder.h"
12 11
13 namespace blink { 12 namespace blink {
14 13
15 typedef struct { 14 typedef struct {
16 const char* input; 15 const char* input;
17 const char* output; 16 const char* output;
18 } TestCase; 17 } TestCase;
19 18
20 TEST(MediaConditionParserTest, Basic) 19 TEST(MediaConditionParserTest, Basic)
(...skipping 19 matching lines...) Expand all
40 for (unsigned i = 0; testCases[i].input; ++i) { 39 for (unsigned i = 0; testCases[i].input; ++i) {
41 CSSTokenizer::Scope scope(testCases[i].input); 40 CSSTokenizer::Scope scope(testCases[i].input);
42 MediaQuerySet* mediaConditionQuerySet = MediaQueryParser::parseMediaCond ition(scope.tokenRange()); 41 MediaQuerySet* mediaConditionQuerySet = MediaQueryParser::parseMediaCond ition(scope.tokenRange());
43 ASSERT_EQ(mediaConditionQuerySet->queryVector().size(), (unsigned)1); 42 ASSERT_EQ(mediaConditionQuerySet->queryVector().size(), (unsigned)1);
44 String queryText = mediaConditionQuerySet->queryVector()[0]->cssText(); 43 String queryText = mediaConditionQuerySet->queryVector()[0]->cssText();
45 ASSERT_STREQ(testCases[i].output, queryText.ascii().data()); 44 ASSERT_STREQ(testCases[i].output, queryText.ascii().data());
46 } 45 }
47 } 46 }
48 47
49 } // namespace blink 48 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698