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

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

Issue 1170503003: Remove resource type-specific fetching logic from ResourceFetcher (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Null-check Document::loader() before calling startPreload() 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/ScriptStreamerTest.cpp ('k') | Source/core/core.gypi » ('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 447baf68503d7e6ba3679537e87168849eb83e04..c481ccd6846ed782d85f468b111803ff27f38b29 100644
--- a/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
+++ b/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
@@ -74,13 +74,13 @@ public:
void setEmptyResource()
{
m_resourceRequest = WTF::adoptPtr(new ResourceRequest);
- m_resource = ScriptResource::create(*m_resourceRequest.get(), "UTF-8");
+ m_resource = new ScriptResource(*m_resourceRequest.get(), "UTF-8");
}
void setResource()
{
m_resourceRequest = WTF::adoptPtr(new ResourceRequest(url()));
- m_resource = ScriptResource::create(*m_resourceRequest.get(), "UTF-8");
+ m_resource = new ScriptResource(*m_resourceRequest.get(), "UTF-8");
}
CachedMetadataHandler* cacheHandler()
@@ -90,7 +90,7 @@ public:
protected:
WTF::OwnPtr<ResourceRequest> m_resourceRequest;
- OwnPtrWillBePersistent<ScriptResource> m_resource;
+ ResourcePtr<ScriptResource> m_resource;
V8TestingScope m_scope;
static int counter;
@@ -120,7 +120,7 @@ TEST_F(V8ScriptRunnerTest, parseMemoryOption)
EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForCodeCache(cacheHandler())));
// The cached data is associated with the encoding.
ResourceRequest request(url());
- OwnPtrWillBeRawPtr<ScriptResource> anotherResource = ScriptResource::create(request, "UTF-16");
+ ResourcePtr<ScriptResource> anotherResource = new ScriptResource(request, "UTF-16");
EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForParserCache(anotherResource->cacheHandler())));
}
@@ -132,7 +132,7 @@ TEST_F(V8ScriptRunnerTest, parseOption)
EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForCodeCache(cacheHandler())));
// The cached data is associated with the encoding.
ResourceRequest request(url());
- OwnPtrWillBeRawPtr<ScriptResource> anotherResource = ScriptResource::create(request, "UTF-16");
+ ResourcePtr<ScriptResource> anotherResource = new ScriptResource(request, "UTF-16");
EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForParserCache(anotherResource->cacheHandler())));
}
@@ -144,7 +144,7 @@ TEST_F(V8ScriptRunnerTest, codeOption)
EXPECT_TRUE(cacheHandler()->cachedMetadata(tagForCodeCache(cacheHandler())));
// The cached data is associated with the encoding.
ResourceRequest request(url());
- OwnPtrWillBeRawPtr<ScriptResource> anotherResource = ScriptResource::create(request, "UTF-16");
+ ResourcePtr<ScriptResource> anotherResource = new ScriptResource(request, "UTF-16");
EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForCodeCache(anotherResource->cacheHandler())));
}
« no previous file with comments | « Source/bindings/core/v8/ScriptStreamerTest.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698