Quelle TestXMLSerializerNoBreakLink.cpp
Sprache: C
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Test that serialising some DOM doesn't destroy links by word-wrapping long // href values containing spaces.
TEST(TestXMLSerializerNoBreakLink, TestXMLSerializerNoBreakLinkMain)
{ // Build up a stupidly-long URL with spaces. Default is to wrap at column // 72, so we want to exceed that.
nsString longURL = u"http://www.example.com/link with spaces"_ns; for (int i = 1; i < 125; ++i) {
longURL.Append(u' ');
longURL.Append(IntToTString<char16_t>(i));
}
nsString htmlInput =
u"" "utf-8\">" "Hello Thunderbird! "_ns +
longURL + u"\">Link</a></body></html>"_ns;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.