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

Side by Side Diff: printing/page_range_unittest.cc

Issue 149212: Move printing related stuff to the root printing project from the browser pro... (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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/printing/page_range.h" 5 #include "printing/page_range.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 TEST(PageRangeTest, RangeMerge) { 8 TEST(PageRangeTest, RangeMerge) {
9 printing::PageRanges ranges; 9 printing::PageRanges ranges;
10 printing::PageRange range; 10 printing::PageRange range;
11 range.from = 1; 11 range.from = 1;
12 range.to = 3; 12 range.to = 3;
13 ranges.push_back(range); 13 ranges.push_back(range);
14 range.from = 10; 14 range.from = 10;
15 range.to = 12; 15 range.to = 12;
(...skipping 13 matching lines...) Expand all
29 EXPECT_EQ(12, pages[7]); 29 EXPECT_EQ(12, pages[7]);
30 EXPECT_EQ(8, printing::PageRange::GetTotalPages(ranges)); 30 EXPECT_EQ(8, printing::PageRange::GetTotalPages(ranges));
31 } 31 }
32 32
33 TEST(PageRangeTest, Empty) { 33 TEST(PageRangeTest, Empty) {
34 printing::PageRanges ranges; 34 printing::PageRanges ranges;
35 std::vector<int> pages(printing::PageRange::GetPages(ranges)); 35 std::vector<int> pages(printing::PageRange::GetPages(ranges));
36 EXPECT_EQ(0U, pages.size()); 36 EXPECT_EQ(0U, pages.size());
37 EXPECT_EQ(0, printing::PageRange::GetTotalPages(ranges)); 37 EXPECT_EQ(0, printing::PageRange::GetTotalPages(ranges));
38 } 38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698