Index: third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp |
index 42dca3014fc4f22a304a97fa3ef82d6605f8e5cc..4a203847b12f594aead218f8f89efc57eba0ed78 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp |
@@ -67,18 +67,23 @@ class V8ScriptRunnerTest : public ::testing::Test { |
.IsEmpty(); |
} |
- void SetEmptyResource() { |
- resource_ = ScriptResource::CreateForTest(NullURL(), UTF8Encoding()); |
- } |
+ void SetEmptyResource() { SetResourceInternal(KURL()); } |
+ |
+ void SetResource() { SetResourceInternal(Url()); } |
- void SetResource() { |
- resource_ = ScriptResource::CreateForTest(Url(), UTF8Encoding()); |
+ void SetResourceInternal(const KURL& url) { |
+ ScriptResource* resource = |
+ ScriptResource::CreateForTest(url, UTF8Encoding()); |
+ // This is not a complete Resource (e.g. lacks ResourceResponse) |
+ // but is sufficient for testing here. |
+ resource->Finish(); |
+ resource_ = resource->ResourceData(); |
} |
CachedMetadataHandler* CacheHandler() { return resource_->CacheHandler(); } |
protected: |
- Persistent<ScriptResource> resource_; |
+ Persistent<const ScriptResourceData> resource_; |
static int counter_; |
}; |