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

Side by Side Diff: printing/backend/print_backend_unittest.cc

Issue 10941025: Simplify document title for Windows printing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #include "printing/backend/print_backend.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7
8 namespace printing {
9
10 TEST(PrintBackendTest, SimplifyDocumentTitle) {
11 EXPECT_STREQ(L"", PrintBackend::SimplifyDocumentTitle(L"").c_str());
12 EXPECT_STREQ(L"Document wi...oooong name",
13 PrintBackend::SimplifyDocumentTitle(
14 L"Document with very looooooooooong name").c_str());
15 EXPECT_STREQ(L"Control Characters",
16 PrintBackend::SimplifyDocumentTitle(
17 L"C\ron\ntrol Charac\15ters").c_str());
18 EXPECT_STREQ(L"",
19 PrintBackend::SimplifyDocumentTitle(L"\n\r\n\r\x9F\r").c_str());
20 }
21
22 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698