OLD | NEW |
---|---|
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" | |
5 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
6 #include "base/string_util.h" | 7 #include "base/string_util.h" |
7 #include "chrome/browser/printing/page_overlays.h" | 8 #include "printing/page_overlays.h" |
8 #include "chrome/browser/printing/print_settings.h" | 9 #include "printing/print_settings.h" |
9 #include "chrome/browser/printing/printed_document.h" | 10 #include "printing/printed_document.h" |
10 #include "chrome/browser/printing/printed_page.h" | 11 #include "printing/printed_page.h" |
11 #include "chrome/browser/printing/printed_pages_source.h" | 12 #include "printing/printed_pages_source.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 | 14 |
14 namespace { | 15 namespace { |
15 | 16 |
17 base::AtExitManager global_at_exit_manager; | |
M-A Ruel
2009/07/07 20:52:44
I don't understand your comment. I meant moving th
Sverrir
2009/07/07 21:22:58
The failure is in PageOverlyTest construction so i
M-A Ruel
2009/07/09 19:27:59
Still, you can't check that in. It affects every o
Sverrir
2009/07/09 20:13:23
Figured it out. printing_unittest was not using t
| |
18 | |
16 class PageOverlaysTest : public testing::Test { | 19 class PageOverlaysTest : public testing::Test { |
17 private: | 20 private: |
18 MessageLoop message_loop_; | 21 MessageLoop message_loop_; |
19 }; | 22 }; |
20 | 23 |
21 struct Keys { | 24 struct Keys { |
22 const wchar_t* key; | 25 const wchar_t* key; |
23 const wchar_t* expected; | 26 const wchar_t* expected; |
24 }; | 27 }; |
25 | 28 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 UTF16ToWide(L"Page {page}")); | 83 UTF16ToWide(L"Page {page}")); |
81 input = overlays.GetOverlay(printing::PageOverlays::LEFT, | 84 input = overlays.GetOverlay(printing::PageOverlays::LEFT, |
82 printing::PageOverlays::TOP); | 85 printing::PageOverlays::TOP); |
83 EXPECT_EQ(input, L"Page {page}"); | 86 EXPECT_EQ(input, L"Page {page}"); |
84 | 87 |
85 // Replace the variables to see if the page number is correct. | 88 // Replace the variables to see if the page number is correct. |
86 out = printing::PageOverlays::ReplaceVariables(input, *doc.get(), | 89 out = printing::PageOverlays::ReplaceVariables(input, *doc.get(), |
87 *page.get()); | 90 *page.get()); |
88 EXPECT_EQ(out, L"Page 1"); | 91 EXPECT_EQ(out, L"Page 1"); |
89 } | 92 } |
OLD | NEW |