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

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

Issue 2724673002: [WIP] Introduce ScriptResourceData
Patch Set: Compile fix Created 3 years, 4 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
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_;
};
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp ('k') | third_party/WebKit/Source/core/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698