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

Side by Side Diff: Source/web/tests/PageSerializerTest.cpp

Issue 23202008: Add font support to PageSerializer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding font (I've heard this might work now) Created 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. 2 * Copyright (c) 2013, Opera Software ASA. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 { 209 {
210 setBaseFolder("pageserializer/dtd/"); 210 setBaseFolder("pageserializer/dtd/");
211 211
212 registerURL("dtd.html", "text/html"); 212 registerURL("dtd.html", "text/html");
213 serialize("dtd.html"); 213 serialize("dtd.html");
214 214
215 String expectedStart("<!DOCTYPE html>"); 215 String expectedStart("<!DOCTYPE html>");
216 EXPECT_TRUE(getSerializedData("dtd.html").startsWith(expectedStart)); 216 EXPECT_TRUE(getSerializedData("dtd.html").startsWith(expectedStart));
217 } 217 }
218 218
219 TEST_F(PageSerializerTest, Font)
220 {
221 setBaseFolder("pageserializer/font/");
222
223 registerURL("font.html", "text/html");
224 registerURL("font.ttf", "application/octet-stream");
225
226 serialize("font.html");
227
228 EXPECT_TRUE(isSerialized("font.ttf", "application/octet-stream"));
219 } 229 }
230
231 }
OLDNEW
« no previous file with comments | « Source/core/page/PageSerializer.cpp ('k') | Source/web/tests/data/pageserializer/font/font.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698