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

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

Issue 12378050: PPAPI: Remove threading options; it's always on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PDFResource unit test Created 7 years, 8 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 | « ppapi/proxy/locking_resource_releaser.h ('k') | ppapi/proxy/plugin_globals.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 (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/utf_string_conversions.h" 7 #include "base/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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 ASSERT_EQ(PpapiHostMsg_PDF_GetLocalizedString::ID, 52 ASSERT_EQ(PpapiHostMsg_PDF_GetLocalizedString::ID,
53 handler.last_handled_msg().type()); 53 handler.last_handled_msg().type());
54 ASSERT_EQ(expected_string, actual_string); 54 ASSERT_EQ(expected_string, actual_string);
55 } 55 }
56 56
57 // Remove the filter or it will be destroyed before the sink() is destroyed. 57 // Remove the filter or it will be destroyed before the sink() is destroyed.
58 sink().RemoveFilter(&handler); 58 sink().RemoveFilter(&handler);
59 } 59 }
60 60
61 TEST_F(PDFResourceTest, SearchString) { 61 TEST_F(PDFResourceTest, SearchString) {
62 ProxyAutoLock lock;
62 // Instantiate a resource explicitly so we can specify the locale. 63 // Instantiate a resource explicitly so we can specify the locale.
63 scoped_refptr<PDFResource> pdf_resource( 64 scoped_refptr<PDFResource> pdf_resource(
64 new PDFResource(Connection(&sink(), &sink()), pp_instance())); 65 new PDFResource(Connection(&sink(), &sink()), pp_instance()));
65 pdf_resource->SetLocaleForTest("en-US"); 66 pdf_resource->SetLocaleForTest("en-US");
66 67
67 string16 input; 68 string16 input;
68 string16 term; 69 string16 term;
69 UTF8ToUTF16("abcdefabcdef", 12, &input); 70 UTF8ToUTF16("abcdefabcdef", 12, &input);
70 UTF8ToUTF16("bc", 2, &term); 71 UTF8ToUTF16("bc", 2, &term);
71 72
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 200
200 resource_tracker->ReleaseResource(resource); 201 resource_tracker->ReleaseResource(resource);
201 } 202 }
202 203
203 // Remove the filter or it will be destroyed before the sink() is destroyed. 204 // Remove the filter or it will be destroyed before the sink() is destroyed.
204 sink().RemoveFilter(&handler); 205 sink().RemoveFilter(&handler);
205 } 206 }
206 207
207 } // namespace proxy 208 } // namespace proxy
208 } // namespace ppapi 209 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/locking_resource_releaser.h ('k') | ppapi/proxy/plugin_globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698