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

Side by Side Diff: ppapi/proxy/pdf_resource_unittest.cc

Issue 121123002: Update uses of UTF conversions in ppapi/, printing/, remoting/, rlz/, sandbox/, skia/, sql/, sync/,… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | ppapi/shared_impl/file_ref_util.cc » ('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) 2012 The Chromium Authors. All rights reserved. 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 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 <cstring> 5 #include <cstring>
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ppapi/c/dev/ppb_memory_dev.h" 8 #include "ppapi/c/dev/ppb_memory_dev.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/c/ppb_image_data.h" 10 #include "ppapi/c/ppb_image_data.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 TEST_F(PDFResourceTest, SearchString) { 61 TEST_F(PDFResourceTest, SearchString) {
62 ProxyAutoLock lock; 62 ProxyAutoLock lock;
63 // Instantiate a resource explicitly so we can specify the locale. 63 // Instantiate a resource explicitly so we can specify the locale.
64 scoped_refptr<PDFResource> pdf_resource( 64 scoped_refptr<PDFResource> pdf_resource(
65 new PDFResource(Connection(&sink(), &sink()), pp_instance())); 65 new PDFResource(Connection(&sink(), &sink()), pp_instance()));
66 pdf_resource->SetLocaleForTest("en-US"); 66 pdf_resource->SetLocaleForTest("en-US");
67 67
68 base::string16 input; 68 base::string16 input;
69 base::string16 term; 69 base::string16 term;
70 UTF8ToUTF16("abcdefabcdef", 12, &input); 70 base::UTF8ToUTF16("abcdefabcdef", 12, &input);
71 UTF8ToUTF16("bc", 2, &term); 71 base::UTF8ToUTF16("bc", 2, &term);
72 72
73 PP_PrivateFindResult* results; 73 PP_PrivateFindResult* results;
74 int count = 0; 74 int count = 0;
75 pdf_resource->SearchString( 75 pdf_resource->SearchString(
76 reinterpret_cast<const unsigned short*>(input.c_str()), 76 reinterpret_cast<const unsigned short*>(input.c_str()),
77 reinterpret_cast<const unsigned short*>(term.c_str()), 77 reinterpret_cast<const unsigned short*>(term.c_str()),
78 true, 78 true,
79 &results, 79 &results,
80 &count); 80 &count);
81 81
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 resource_tracker->ReleaseResource(resource); 198 resource_tracker->ReleaseResource(resource);
199 } 199 }
200 200
201 // Remove the filter or it will be destroyed before the sink() is destroyed. 201 // Remove the filter or it will be destroyed before the sink() is destroyed.
202 sink().RemoveFilter(&handler); 202 sink().RemoveFilter(&handler);
203 } 203 }
204 204
205 } // namespace proxy 205 } // namespace proxy
206 } // namespace ppapi 206 } // namespace ppapi
OLDNEW
« no previous file with comments | « no previous file | ppapi/shared_impl/file_ref_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698