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

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

Issue 1169033004: Merge page serializers [8/12] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | Source/web/tests/data/pageserializer/dtd/dtd.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 serialize("xmldecl.xml"); 314 serialize("xmldecl.xml");
315 315
316 String expectedStart("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); 316 String expectedStart("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
317 EXPECT_TRUE(getSerializedData("xmldecl.xml").startsWith(expectedStart)); 317 EXPECT_TRUE(getSerializedData("xmldecl.xml").startsWith(expectedStart));
318 } 318 }
319 319
320 TEST_F(PageSerializerTest, DTD) 320 TEST_F(PageSerializerTest, DTD)
321 { 321 {
322 setBaseFolder("pageserializer/dtd/"); 322 setBaseFolder("pageserializer/dtd/");
323 323
324 registerURL("dtd.html", "text/html"); 324 registerURL("html5.html", "text/html");
325 serialize("dtd.html"); 325 serialize("html5.html");
326 326
327 String expectedStart("<!DOCTYPE html>"); 327 String expectedStart("<!DOCTYPE html>");
328 EXPECT_TRUE(getSerializedData("dtd.html").startsWith(expectedStart)); 328 EXPECT_TRUE(getSerializedData("html5.html").startsWith(expectedStart));
329 } 329 }
330 330
331 TEST_F(PageSerializerTest, Font) 331 TEST_F(PageSerializerTest, Font)
332 { 332 {
333 setBaseFolder("pageserializer/font/"); 333 setBaseFolder("pageserializer/font/");
334 334
335 registerURL("font.html", "text/html"); 335 registerURL("font.html", "text/html");
336 registerURL("font.ttf", "application/octet-stream"); 336 registerURL("font.ttf", "application/octet-stream");
337 337
338 serialize("font.html"); 338 serialize("font.html");
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 registerURL("namespace_element.html", "text/html"); 401 registerURL("namespace_element.html", "text/html");
402 402
403 serialize("namespace_element.html"); 403 serialize("namespace_element.html");
404 404
405 EXPECT_EQ(1U, getResources().size()); 405 EXPECT_EQ(1U, getResources().size());
406 EXPECT_TRUE(isSerialized("namespace_element.html", "text/html")); 406 EXPECT_TRUE(isSerialized("namespace_element.html", "text/html"));
407 EXPECT_GT(getSerializedData("namespace_element.html", "text/html").length(), 0U); 407 EXPECT_GT(getSerializedData("namespace_element.html", "text/html").length(), 0U);
408 } 408 }
409 409
410 } 410 }
OLDNEW
« no previous file with comments | « no previous file | Source/web/tests/data/pageserializer/dtd/dtd.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698