Chromium Code Reviews| Index: components/nacl/browser/pnacl_translation_cache_unittest.cc |
| diff --git a/components/nacl/browser/pnacl_translation_cache_unittest.cc b/components/nacl/browser/pnacl_translation_cache_unittest.cc |
| index 94cd681f955c48e0949e095c382381d78d5edb6b..665620f88b7414ac5fc8a3c729eb687d0e6f8c71 100644 |
| --- a/components/nacl/browser/pnacl_translation_cache_unittest.cc |
| +++ b/components/nacl/browser/pnacl_translation_cache_unittest.cc |
| @@ -127,57 +127,68 @@ TEST(PnaclTranslationCacheKeyTest, CacheKeyTest) { |
| info.pexe_url = GURL("http://www.google.com"); |
| info.abi_version = 0; |
| info.opt_level = 0; |
| + info.sandbox_isa = "x86-32"; |
| std::string test_time("Wed, 15 Nov 1995 06:25:24 GMT"); |
| base::Time::FromString(test_time.c_str(), &info.last_modified); |
| // Basic check for URL and time components |
| EXPECT_EQ("ABI:0;opt:0;URL:http://www.google.com/;" |
| - "modified:1995:11:15:6:25:24:0:UTC;etag:", |
| + "modified:1995:11:15:6:25:24:0:UTC;etag:;" |
| + "sandbox:x86-32;extra_flags:;", |
| PnaclTranslationCache::GetKey(info)); |
| // Check that query portion of URL is not stripped |
| info.pexe_url = GURL("http://www.google.com/?foo=bar"); |
| EXPECT_EQ("ABI:0;opt:0;URL:http://www.google.com/?foo=bar;" |
| - "modified:1995:11:15:6:25:24:0:UTC;etag:", |
| + "modified:1995:11:15:6:25:24:0:UTC;etag:;" |
| + "sandbox:x86-32;extra_flags:;", |
| PnaclTranslationCache::GetKey(info)); |
| // Check that username, password, and normal port are stripped |
| info.pexe_url = GURL("https://user:host@www.google.com:443/"); |
| EXPECT_EQ("ABI:0;opt:0;URL:https://www.google.com/;" |
| - "modified:1995:11:15:6:25:24:0:UTC;etag:", |
| + "modified:1995:11:15:6:25:24:0:UTC;etag:;" |
| + "sandbox:x86-32;extra_flags:;", |
| PnaclTranslationCache::GetKey(info)); |
| // Check that unusual port is not stripped but ref is stripped |
| info.pexe_url = GURL("https://www.google.com:444/#foo"); |
| EXPECT_EQ("ABI:0;opt:0;URL:https://www.google.com:444/;" |
| - "modified:1995:11:15:6:25:24:0:UTC;etag:", |
| + "modified:1995:11:15:6:25:24:0:UTC;etag:;" |
| + "sandbox:x86-32;extra_flags:;", |
| PnaclTranslationCache::GetKey(info)); |
| // Check chrome-extesnsion scheme |
| info.pexe_url = GURL("chrome-extension://ljacajndfccfgnfohlgkdphmbnpkjflk/"); |
| EXPECT_EQ("ABI:0;opt:0;" |
| "URL:chrome-extension://ljacajndfccfgnfohlgkdphmbnpkjflk/;" |
| - "modified:1995:11:15:6:25:24:0:UTC;etag:", |
| + "modified:1995:11:15:6:25:24:0:UTC;etag:;" |
| + "sandbox:x86-32;extra_flags:;", |
| PnaclTranslationCache::GetKey(info)); |
| // Check that ABI version, opt level, and etag are in the key |
| info.pexe_url = GURL("http://www.google.com/"); |
| info.abi_version = 2; |
| EXPECT_EQ("ABI:2;opt:0;URL:http://www.google.com/;" |
| - "modified:1995:11:15:6:25:24:0:UTC;etag:", |
| + "modified:1995:11:15:6:25:24:0:UTC;etag:;" |
| + "sandbox:x86-32;extra_flags:;", |
| PnaclTranslationCache::GetKey(info)); |
| info.opt_level = 2; |
| EXPECT_EQ("ABI:2;opt:2;URL:http://www.google.com/;" |
| - "modified:1995:11:15:6:25:24:0:UTC;etag:", |
| + "modified:1995:11:15:6:25:24:0:UTC;etag:;" |
| + "sandbox:x86-32;extra_flags:;", |
| PnaclTranslationCache::GetKey(info)); |
| info.etag = std::string("etag"); |
| EXPECT_EQ("ABI:2;opt:2;URL:http://www.google.com/;" |
| - "modified:1995:11:15:6:25:24:0:UTC;etag:etag", |
| + "modified:1995:11:15:6:25:24:0:UTC;etag:etag;" |
| + "sandbox:x86-32;extra_flags:;", |
| PnaclTranslationCache::GetKey(info)); |
| // Check for all the time components, and null time |
| info.last_modified = base::Time(); |
| EXPECT_EQ("ABI:2;opt:2;URL:http://www.google.com/;" |
| - "modified:0:0:0:0:0:0:0:UTC;etag:etag", |
| + "modified:0:0:0:0:0:0:0:UTC;etag:etag;" |
| + "sandbox:x86-32;extra_flags:;", |
| PnaclTranslationCache::GetKey(info)); |
| test_time.assign("Fri, 29 Feb 2008 13:04:12 GMT"); |
| base::Time::FromString(test_time.c_str(), &info.last_modified); |
| EXPECT_EQ("ABI:2;opt:2;URL:http://www.google.com/;" |
| - "modified:2008:2:29:13:4:12:0:UTC;etag:etag", |
| + "modified:2008:2:29:13:4:12:0:UTC;etag:etag;" |
| + "sandbox:x86-32;extra_flags:;", |
| PnaclTranslationCache::GetKey(info)); |
|
jvoung (off chromium)
2014/02/15 02:07:27
maybe add a test where info.extra_flags is actuall
Derek Schuff
2014/02/15 05:59:18
Done.
|
| } |