Chromium Code Reviews| Index: content/browser/shared_worker/shared_worker_instance_unittest.cc |
| diff --git a/content/browser/shared_worker/shared_worker_instance_unittest.cc b/content/browser/shared_worker/shared_worker_instance_unittest.cc |
| index c78cb1fe0a5f76ae36b33f437875f1f86e6f2ba0..501e23cf241e4cfdcd2e2a9f96c71df953aadf04 100644 |
| --- a/content/browser/shared_worker/shared_worker_instance_unittest.cc |
| +++ b/content/browser/shared_worker/shared_worker_instance_unittest.cc |
| @@ -49,7 +49,7 @@ class SharedWorkerInstanceTest : public testing::Test { |
| TEST_F(SharedWorkerInstanceTest, MatchesTest) { |
| SharedWorkerInstance instance1( |
| GURL("http://example.com/w.js"), base::string16(), base::string16(), |
| - blink::WebContentSecurityPolicyTypeReport, |
| + blink::WebContentSecurityPolicyTypeReport, blink::WebAddressSpacePublic, |
| browser_context_->GetResourceContext(), partition_id_, |
| blink::WebSharedWorkerCreationContextTypeNonsecure); |
| EXPECT_TRUE(Matches(instance1, "http://example.com/w.js", "")); |
| @@ -64,8 +64,8 @@ TEST_F(SharedWorkerInstanceTest, MatchesTest) { |
| SharedWorkerInstance instance2( |
| GURL("http://example.com/w.js"), base::ASCIIToUTF16("name"), |
| base::string16(), blink::WebContentSecurityPolicyTypeReport, |
| - browser_context_->GetResourceContext(), partition_id_, |
| - blink::WebSharedWorkerCreationContextTypeNonsecure); |
| + blink::WebAddressSpacePublic, browser_context_->GetResourceContext(), |
| + partition_id_, blink::WebSharedWorkerCreationContextTypeNonsecure); |
| 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", "")); |
| @@ -80,4 +80,17 @@ TEST_F(SharedWorkerInstanceTest, MatchesTest) { |
| EXPECT_FALSE(Matches(instance2, "http://example.net/w2.js", "name2")); |
| } |
| +TEST_F(SharedWorkerInstanceTest, AddressSpace) { |
| + for (int i = 0; i < 3; i++) { |
|
kinuko
2016/03/08 15:53:56
Maybe
i = 0; i <= static_cast<int>(WebAddressSpa
|
| + SharedWorkerInstance instance( |
| + GURL("http://example.com/w.js"), base::ASCIIToUTF16("name"), |
| + base::string16(), blink::WebContentSecurityPolicyTypeReport, |
| + static_cast<blink::WebAddressSpace>(i), |
| + browser_context_->GetResourceContext(), partition_id_, |
| + blink::WebSharedWorkerCreationContextTypeNonsecure); |
| + EXPECT_EQ(static_cast<blink::WebAddressSpace>(i), |
| + instance.creation_address_space()); |
| + } |
| +} |
| + |
| } // namespace content |