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

Side by Side Diff: LayoutTests/fast/css/fontfaceset-iterator.html

Issue 557763003: Add iterator support to FontFaceSet (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/css/fontfaceset-iterator-expected.txt » ('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/js-test.js"></script>
3 <style>
4 @font-face {
5 font-family: font1;
6 src: local(Arial);
7 }
8 @font-face {
9 font-family: font2;
10 src: local(Arial);
11 }
12 </style>
13 <script>
14 description('Tests iterators of FontFaceSet.');
15
16 var font3 = new FontFace('font3', 'local(Arial)');
17 document.fonts.add(font3);
18
19 var expected = ['font1', 'font2', 'font3'];
20 var families;
21
22 families = [];
23 for (var face of document.fonts) {
24 families.push(face.family);
25 }
26 shouldBeEqualToString("families.join(',')", expected.join(','));
27
28 families = [];
29 for (var face of document.fonts.keys()) {
30 families.push(face.family);
31 }
32 shouldBeEqualToString("families.join(',')", expected.join(','));
33
34 families = [];
35 for (var face of document.fonts.values()) {
36 families.push(face.family);
37 }
38 shouldBeEqualToString("families.join(',')", expected.join(','));
39
40 families = [];
41 for (var entry of document.fonts.entries()) {
42 shouldBeTrue('entry[0] === entry[1]');
43 families.push(entry[0].family);
44 }
45 shouldBeEqualToString("families.join(',')", expected.join(','));
46
47 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/fontfaceset-iterator-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698