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

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

Issue 1671263003: Fix non-Oilpan build following r373473. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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/StyleSheetContents.h" 5 #include "core/css/StyleSheetContents.h"
6 6
7 #include "core/css/CSSTestHelper.h" 7 #include "core/css/CSSTestHelper.h"
8 #include "core/css/parser/CSSParser.h" 8 #include "core/css/parser/CSSParser.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 TEST(StyleSheetContentsTest, InsertMediaRule) 13 TEST(StyleSheetContentsTest, InsertMediaRule)
14 { 14 {
15 CSSParserContext context(HTMLStandardMode, nullptr); 15 CSSParserContext context(HTMLStandardMode, nullptr);
16 16
17 RefPtrWillBeRawPtr<StyleSheetContents> styleSheet = StyleSheetContents::crea te(context); 17 RefPtrWillBeRawPtr<StyleSheetContents> styleSheet = StyleSheetContents::crea te(context);
18 styleSheet->parseString("@namespace ns url(test);"); 18 styleSheet->parseString("@namespace ns url(test);");
19 EXPECT_EQ(1U, styleSheet->ruleCount()); 19 EXPECT_EQ(1U, styleSheet->ruleCount());
20 20
21 styleSheet->setMutable(); 21 styleSheet->setMutable();
22 styleSheet->wrapperInsertRule(CSSParser::parseRule(context, styleSheet, "@me dia all { div { color: pink } }"), 0); 22 styleSheet->wrapperInsertRule(CSSParser::parseRule(context, styleSheet.get() , "@media all { div { color: pink } }"), 0);
23 EXPECT_EQ(1U, styleSheet->ruleCount()); 23 EXPECT_EQ(1U, styleSheet->ruleCount());
24 EXPECT_FALSE(styleSheet->hasMediaQueries()); 24 EXPECT_FALSE(styleSheet->hasMediaQueries());
25 25
26 styleSheet->wrapperInsertRule(CSSParser::parseRule(context, styleSheet, "@me dia all { div { color: green } }"), 1); 26 styleSheet->wrapperInsertRule(CSSParser::parseRule(context, styleSheet.get() , "@media all { div { color: green } }"), 1);
27 EXPECT_EQ(2U, styleSheet->ruleCount()); 27 EXPECT_EQ(2U, styleSheet->ruleCount());
28 EXPECT_TRUE(styleSheet->hasMediaQueries()); 28 EXPECT_TRUE(styleSheet->hasMediaQueries());
29 } 29 }
30 30
31 } // namespace blink 31 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698