X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcomponents%2Fnacl%2Fbrowser%2Fpnacl_translation_cache_unittest.cc;h=1cc903b7c95277f0a5b743c796a00819cc327d15;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=94cd681f955c48e0949e095c382381d78d5edb6b;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/components/nacl/browser/pnacl_translation_cache_unittest.cc b/src/components/nacl/browser/pnacl_translation_cache_unittest.cc index 94cd681..1cc903b 100644 --- a/src/components/nacl/browser/pnacl_translation_cache_unittest.cc +++ b/src/components/nacl/browser/pnacl_translation_cache_unittest.cc @@ -127,57 +127,74 @@ 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)); + + info.extra_flags = "-mavx-neon"; + EXPECT_EQ("ABI:2;opt:2;URL:http://www.google.com/;" + "modified:1995:11:15:6:25:24:0:UTC;etag:etag;" + "sandbox:x86-32;extra_flags:-mavx-neon;", 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:-mavx-neon;", 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:-mavx-neon;", PnaclTranslationCache::GetKey(info)); }