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

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

Issue 1637273003: PageRule should not serialize @page in selectorText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win build problem 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
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/CSSPageRule.h"
6
7 #include "core/css/CSSRuleList.h"
8 #include "core/css/CSSTestHelper.h"
9
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 namespace blink {
13
14 TEST(CSSPageRule, Serializing)
15 {
16 CSSTestHelper helper;
17
18 const char* cssRule = "@page :left { size: auto; }";
19 helper.addCSSRules(cssRule);
20 if (helper.cssRules()) {
Timothy Loh 2016/01/31 23:54:24 If this ends up null for some reason, then the tes
21 EXPECT_EQ(1u, helper.cssRules()->length());
22 EXPECT_EQ(String(cssRule), helper.cssRules()->item(0)->cssText());
23 EXPECT_EQ(CSSRule::PAGE_RULE, helper.cssRules()->item(0)->type());
24 if (CSSPageRule* pageRule = toCSSPageRule(helper.cssRules()->item(0)))
25 EXPECT_EQ(":left", pageRule->selectorText());
26 }
27 }
28
29 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPageRule.cpp ('k') | third_party/WebKit/Source/core/css/CSSRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698