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

Side by Side Diff: chromeos/printing/ppd_provider_unittest.cc

Issue 2975013002: Make chromeos CUPS printing code namespaces consistent. (Closed)
Patch Set: Rebase Created 3 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
« no previous file with comments | « chromeos/printing/ppd_provider.cc ('k') | chromeos/printing/printer_translator.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <map> 5 #include <map>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
11 #include "base/files/scoped_temp_dir.h" 11 #include "base/files/scoped_temp_dir.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/run_loop.h" 14 #include "base/run_loop.h"
15 #include "base/single_thread_task_runner.h" 15 #include "base/single_thread_task_runner.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
17 #include "base/test/scoped_task_environment.h" 17 #include "base/test/scoped_task_environment.h"
18 #include "base/test/test_message_loop.h" 18 #include "base/test/test_message_loop.h"
19 #include "base/threading/sequenced_task_runner_handle.h" 19 #include "base/threading/sequenced_task_runner_handle.h"
20 #include "base/threading/thread_task_runner_handle.h" 20 #include "base/threading/thread_task_runner_handle.h"
21 #include "chromeos/chromeos_paths.h" 21 #include "chromeos/chromeos_paths.h"
22 #include "chromeos/printing/ppd_cache.h" 22 #include "chromeos/printing/ppd_cache.h"
23 #include "chromeos/printing/ppd_provider.h" 23 #include "chromeos/printing/ppd_provider.h"
24 #include "net/url_request/test_url_request_interceptor.h" 24 #include "net/url_request/test_url_request_interceptor.h"
25 #include "net/url_request/url_request_test_util.h" 25 #include "net/url_request/url_request_test_util.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 27
28 namespace chromeos { 28 namespace chromeos {
29 namespace printing {
30 29
31 namespace { 30 namespace {
32 31
33 // Name of the fake server we're resolving ppds from. 32 // Name of the fake server we're resolving ppds from.
34 const char kPpdServer[] = "bogus.google.com"; 33 const char kPpdServer[] = "bogus.google.com";
35 34
36 // A pseudo-ppd that should get cupsFilter lines extracted from it. 35 // A pseudo-ppd that should get cupsFilter lines extracted from it.
37 const char kCupsFilterPpdContents[] = R"( 36 const char kCupsFilterPpdContents[] = R"(
38 Other random contents that we don't care about. 37 Other random contents that we don't care about.
39 *cupsFilter: "application/vnd.cups-raster 0 my_filter" 38 *cupsFilter: "application/vnd.cups-raster 0 my_filter"
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 captured_resolve_ppd_[0].ppd_filters); 548 captured_resolve_ppd_[0].ppd_filters);
550 549
551 EXPECT_EQ(PpdProvider::SUCCESS, captured_resolve_ppd_[1].code); 550 EXPECT_EQ(PpdProvider::SUCCESS, captured_resolve_ppd_[1].code);
552 EXPECT_EQ(kCupsFilter2PpdContents, captured_resolve_ppd_[1].ppd_contents); 551 EXPECT_EQ(kCupsFilter2PpdContents, captured_resolve_ppd_[1].ppd_contents);
553 EXPECT_EQ( 552 EXPECT_EQ(
554 std::vector<std::string>({"another_real_filter", "the_real_filter"}), 553 std::vector<std::string>({"another_real_filter", "the_real_filter"}),
555 captured_resolve_ppd_[1].ppd_filters); 554 captured_resolve_ppd_[1].ppd_filters);
556 } 555 }
557 556
558 } // namespace 557 } // namespace
559 } // namespace printing
560 } // namespace chromeos 558 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/printing/ppd_provider.cc ('k') | chromeos/printing/printer_translator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698