зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1119503 - Part 4: Add a test for serialization of block elements without style information; r=bzbarsky
This commit is contained in:
Родитель
b378354abd
Коммит
3f37e1a74e
|
@ -137,6 +137,31 @@ TestPreElement()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
TestBlockElement()
|
||||
{
|
||||
nsString test;
|
||||
test.AppendLiteral(
|
||||
"<html>" NS_LINEBREAK
|
||||
"<body>" NS_LINEBREAK
|
||||
"<div>" NS_LINEBREAK
|
||||
" first" NS_LINEBREAK
|
||||
"</div>" NS_LINEBREAK
|
||||
"<div>" NS_LINEBREAK
|
||||
" second" NS_LINEBREAK
|
||||
"</div>" NS_LINEBREAK
|
||||
"</body>" NS_LINEBREAK "</html>");
|
||||
|
||||
ConvertBufToPlainText(test, 0);
|
||||
if (!test.EqualsLiteral("first" NS_LINEBREAK "second" NS_LINEBREAK)) {
|
||||
fail("Wrong prettyprinted html to text serialization");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
passed("prettyprinted HTML to text serialization test");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
TestPlainTextSerializer()
|
||||
{
|
||||
|
@ -163,6 +188,9 @@ TestPlainTextSerializer()
|
|||
rv = TestPreElement();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = TestBlockElement();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Add new tests here...
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче