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

Side by Side Diff: components/nacl/browser/pnacl_host_unittest.cc

Issue 1005173006: Add a switch for using PNaCl Subzero and use it for -O0 translation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix takefileinfo Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/nacl/browser/pnacl_host.h" 5 #include "components/nacl/browser/pnacl_host.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 content::TestBrowserThreadBundle thread_bundle_; 108 content::TestBrowserThreadBundle thread_bundle_;
109 base::ScopedTempDir temp_dir_; 109 base::ScopedTempDir temp_dir_;
110 }; 110 };
111 111
112 static nacl::PnaclCacheInfo GetTestCacheInfo() { 112 static nacl::PnaclCacheInfo GetTestCacheInfo() {
113 nacl::PnaclCacheInfo info; 113 nacl::PnaclCacheInfo info;
114 info.pexe_url = GURL("http://www.google.com"); 114 info.pexe_url = GURL("http://www.google.com");
115 info.abi_version = 0; 115 info.abi_version = 0;
116 info.opt_level = 0; 116 info.opt_level = 0;
117 info.has_no_store_header = false; 117 info.has_no_store_header = false;
118 info.use_subzero = false;
118 return info; 119 return info;
119 } 120 }
120 121
121 #define GET_NEXE_FD(renderer, instance, incognito, info, expect_hit) \ 122 #define GET_NEXE_FD(renderer, instance, incognito, info, expect_hit) \
122 do { \ 123 do { \
123 SCOPED_TRACE(""); \ 124 SCOPED_TRACE(""); \
124 host_->GetNexeFd( \ 125 host_->GetNexeFd( \
125 renderer, \ 126 renderer, \
126 0, /* ignore render_view_id for now */ \ 127 0, /* ignore render_view_id for now */ \
127 instance, \ 128 instance, \
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 // Since there's no easy way to pump message queues one message at a time, we 451 // Since there's no easy way to pump message queues one message at a time, we
451 // have to simulate what would happen if 1 DeInitIfsafe task gets queued, then 452 // have to simulate what would happen if 1 DeInitIfsafe task gets queued, then
452 // a GetNexeFd gets queued, and then another DeInitIfSafe gets queued before 453 // a GetNexeFd gets queued, and then another DeInitIfSafe gets queued before
453 // the first one runs. We can just shortcut and call DeInitIfSafe while the 454 // the first one runs. We can just shortcut and call DeInitIfSafe while the
454 // cache is still initializing. 455 // cache is still initializing.
455 DeInit(); 456 DeInit();
456 base::RunLoop().RunUntilIdle(); 457 base::RunLoop().RunUntilIdle();
457 } 458 }
458 459
459 } // namespace pnacl 460 } // namespace pnacl
OLDNEW
« no previous file with comments | « chrome/test/nacl/nacl_browsertest_util.cc ('k') | components/nacl/browser/pnacl_translation_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698