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

Unified Diff: Source/bindings/core/v8/V8ScriptRunnerTest.cpp

Issue 1195763002: Cleanup: Remove experimental V8 cache strategies that we discarded. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add #if-guard for multi-CL change. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/core/v8/V8ScriptRunner.cpp ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8ScriptRunnerTest.cpp
diff --git a/Source/bindings/core/v8/V8ScriptRunnerTest.cpp b/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
index c481ccd6846ed782d85f468b111803ff27f38b29..9d72cc2ff119228d3ed83a1e238b9bd8193ba716 100644
--- a/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
+++ b/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
@@ -101,7 +101,6 @@ int V8ScriptRunnerTest::counter = 0;
TEST_F(V8ScriptRunnerTest, resourcelessShouldPass)
{
EXPECT_TRUE(compileScript(V8CacheOptionsNone));
- EXPECT_TRUE(compileScript(V8CacheOptionsParseMemory));
EXPECT_TRUE(compileScript(V8CacheOptionsParse));
EXPECT_TRUE(compileScript(V8CacheOptionsCode));
}
@@ -112,18 +111,6 @@ TEST_F(V8ScriptRunnerTest, emptyResourceDoesNotHaveCacheHandler)
EXPECT_FALSE(cacheHandler());
}
-TEST_F(V8ScriptRunnerTest, parseMemoryOption)
-{
- setResource();
- EXPECT_TRUE(compileScript(V8CacheOptionsParseMemory));
- EXPECT_TRUE(cacheHandler()->cachedMetadata(tagForParserCache(cacheHandler())));
- EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForCodeCache(cacheHandler())));
- // The cached data is associated with the encoding.
- ResourceRequest request(url());
- ResourcePtr<ScriptResource> anotherResource = new ScriptResource(request, "UTF-16");
- EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForParserCache(anotherResource->cacheHandler())));
-}
-
TEST_F(V8ScriptRunnerTest, parseOption)
{
setResource();
@@ -139,7 +126,11 @@ TEST_F(V8ScriptRunnerTest, parseOption)
TEST_F(V8ScriptRunnerTest, codeOption)
{
setResource();
+
+ // Compile twice, since 'code' has a probation period before it caches.
+ EXPECT_TRUE(compileScript(V8CacheOptionsCode));
EXPECT_TRUE(compileScript(V8CacheOptionsCode));
+
EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForParserCache(cacheHandler())));
EXPECT_TRUE(cacheHandler()->cachedMetadata(tagForCodeCache(cacheHandler())));
// The cached data is associated with the encoding.
@@ -148,14 +139,6 @@ TEST_F(V8ScriptRunnerTest, codeOption)
EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForCodeCache(anotherResource->cacheHandler())));
}
-TEST_F(V8ScriptRunnerTest, codeCompressedOptions)
-{
- setResource();
- EXPECT_TRUE(compileScript(V8CacheOptionsCodeCompressed));
- EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForParserCache(cacheHandler())));
- EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForCodeCache(cacheHandler())));
-}
-
} // namespace
} // namespace blink
« no previous file with comments | « Source/bindings/core/v8/V8ScriptRunner.cpp ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698