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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/font-face-family-setting.html

Issue 2390373002: Fix setting properties on CSSFontFaceRule (Closed)
Patch Set: Patch for landing Created 4 years, 2 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 | third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <style>
5 @font-face {
6 font-family: "Foo Bar";
7 }
8 </style>
9 <script>
10 rule = document.styleSheets[0].cssRules[0];
11
12 test(function() {
13 assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"');
14 rule.style.setProperty('font-family', rule.style.getPropertyValue('font-family '));
15 assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"');
16 rule.style.fontFamily = rule.style.fontFamily;
17 assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"');
18 rule.style['font-family'] = rule.style['font-family'];
19 assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"');
20 }, 'Should be parsed using font-face descriptor parsing rules and accepted.');
21
22 test(function() {
23 rule.style.setProperty('font-family', "'Test', serif");
24 assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"');
25 rule.style.setProperty('font-family', "Verdana, Arial, Helvetica");
26 assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"');
27 }, 'Should be parsed using font-face descriptor parsing rules and rejected.');
28
29 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698