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

Side by Side Diff: printing/page_overlays_unittest.cc

Issue 149407: Make the printint_unittest use the correct test harness. This removes the ne... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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
« no previous file with comments | « no previous file | printing/printing.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/at_exit.h"
6 #include "base/message_loop.h" 5 #include "base/message_loop.h"
7 #include "base/string_util.h" 6 #include "base/string_util.h"
8 #include "printing/page_overlays.h" 7 #include "printing/page_overlays.h"
9 #include "printing/print_settings.h" 8 #include "printing/print_settings.h"
10 #include "printing/printed_document.h" 9 #include "printing/printed_document.h"
11 #include "printing/printed_page.h" 10 #include "printing/printed_page.h"
12 #include "printing/printed_pages_source.h" 11 #include "printing/printed_pages_source.h"
13 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
14 13
15 namespace { 14 namespace {
16 15
17 base::AtExitManager global_at_exit_manager;
18
19 class PageOverlaysTest : public testing::Test { 16 class PageOverlaysTest : public testing::Test {
20 private: 17 private:
21 MessageLoop message_loop_; 18 MessageLoop message_loop_;
22 }; 19 };
23 20
24 struct Keys { 21 struct Keys {
25 const wchar_t* key; 22 const wchar_t* key;
26 const wchar_t* expected; 23 const wchar_t* expected;
27 }; 24 };
28 25
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 UTF16ToWide(L"Page {page}")); 80 UTF16ToWide(L"Page {page}"));
84 input = overlays.GetOverlay(printing::PageOverlays::LEFT, 81 input = overlays.GetOverlay(printing::PageOverlays::LEFT,
85 printing::PageOverlays::TOP); 82 printing::PageOverlays::TOP);
86 EXPECT_EQ(input, L"Page {page}"); 83 EXPECT_EQ(input, L"Page {page}");
87 84
88 // Replace the variables to see if the page number is correct. 85 // Replace the variables to see if the page number is correct.
89 out = printing::PageOverlays::ReplaceVariables(input, *doc.get(), 86 out = printing::PageOverlays::ReplaceVariables(input, *doc.get(),
90 *page.get()); 87 *page.get());
91 EXPECT_EQ(out, L"Page 1"); 88 EXPECT_EQ(out, L"Page 1");
92 } 89 }
OLDNEW
« no previous file with comments | « no previous file | printing/printing.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698