protected:
SharedWorkerInstanceTest()
: browser_context_(new TestBrowserContext()),
- partition_(new WorkerStoragePartition(
- browser_context_->GetRequestContext(),
- NULL, NULL, NULL, NULL, NULL, NULL, NULL)) {
- }
+ partition_(
+ new WorkerStoragePartition(browser_context_->GetRequestContext(),
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL)),
+ partition_id_(*partition_.get()) {}
bool Matches(const SharedWorkerInstance& instance,
const std::string& url,
const base::StringPiece& name) {
return instance.Matches(GURL(url),
base::ASCIIToUTF16(name),
- *partition_.get(),
+ partition_id_,
browser_context_->GetResourceContext());
}
scoped_ptr<TestBrowserContext> browser_context_;
scoped_ptr<WorkerStoragePartition> partition_;
+ const WorkerStoragePartitionId partition_id_;
DISALLOW_COPY_AND_ASSIGN(SharedWorkerInstanceTest);
};
base::string16(),
blink::WebContentSecurityPolicyTypeReport,
browser_context_->GetResourceContext(),
- *partition_.get());
+ partition_id_);
EXPECT_TRUE(Matches(instance1, "http://example.com/w.js", ""));
EXPECT_FALSE(Matches(instance1, "http://example.com/w2.js", ""));
EXPECT_FALSE(Matches(instance1, "http://example.net/w.js", ""));
base::string16(),
blink::WebContentSecurityPolicyTypeReport,
browser_context_->GetResourceContext(),
- *partition_.get());
+ partition_id_);
EXPECT_FALSE(Matches(instance2, "http://example.com/w.js", ""));
EXPECT_FALSE(Matches(instance2, "http://example.com/w2.js", ""));
EXPECT_FALSE(Matches(instance2, "http://example.net/w.js", ""));