Change wording in the banner to invite to use Apps Developer Tools from "It's also...
[chromium-blink-merge.git] / printing / backend / print_backend_unittest.cc
blob356a34627bf4f6cba581a4067fc9255e70df53db
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/strings/utf_string_conversions.h"
6 #include "printing/backend/print_backend.h"
7 #include "testing/gtest/include/gtest/gtest.h"
9 namespace printing {
11 std::string Simplify(const char* title) {
12 return UTF16ToUTF8(PrintBackend::SimplifyDocumentTitle(ASCIIToUTF16(title)));
15 TEST(PrintBackendTest, SimplifyDocumentTitle) {
16 EXPECT_STREQ("", Simplify("").c_str());
17 EXPECT_STREQ("Long string. Long string...ng string. Long string.",
18 Simplify("Long string. Long string. Long string. Long string. "
19 "Long string. Long string. Long string.").c_str());
20 EXPECT_STREQ("Control Characters",
21 Simplify("C\ron\ntrol Charac\15ters").c_str());
22 EXPECT_STREQ("", Simplify("\n\r\n\r\t\r").c_str());
25 } // namespace printing