Bug 1151746 - Origin tuples in should include schemes. r=edwin

This commit is contained in:
JW Wang 2015-04-07 01:32:00 -04:00
Родитель 254ea5d7ad
Коммит ff0f2f0b39
1 изменённых файлов: 45 добавлений и 45 удалений

Просмотреть файл

@ -565,8 +565,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
EXPECT_TRUE(IsGMPStorageIsEmpty());
const nsString origin1 = NS_LITERAL_STRING("example1.com");
const nsString origin2 = NS_LITERAL_STRING("example2.org");
const nsString origin1 = NS_LITERAL_STRING("http://example1.com");
const nsString origin2 = NS_LITERAL_STRING("http://example2.org");
nsCString PBnodeId1 = GetNodeId(origin1, origin2, true);
nsCString PBnodeId2 = GetNodeId(origin1, origin2, true);
@ -602,8 +602,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
// Once we clear storage, the node ids generated for the same origin-pair
// should be different.
const nsString origin1 = NS_LITERAL_STRING("example1.com");
const nsString origin2 = NS_LITERAL_STRING("example2.org");
const nsString origin1 = NS_LITERAL_STRING("http://example1.com");
const nsString origin2 = NS_LITERAL_STRING("http://example2.org");
nsCString nodeId3 = GetNodeId(origin1, origin2, false);
EXPECT_TRUE(!aNodeId1.Equals(nodeId3));
@ -707,8 +707,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
Expect(NS_LITERAL_CSTRING("test-storage complete"),
NS_NewRunnableMethod(this, &GMPStorageTest::SetFinished));
CreateDecryptor(NS_LITERAL_STRING("example1.com"),
NS_LITERAL_STRING("example2.com"),
CreateDecryptor(NS_LITERAL_STRING("http://example1.com"),
NS_LITERAL_STRING("http://example2.com"),
false,
NS_LITERAL_CSTRING("test-storage"));
}
@ -728,8 +728,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
this, &GMPStorageTest::TestForgetThisSite_AnotherSite);
Expect(NS_LITERAL_CSTRING("test-storage complete"), r);
CreateDecryptor(NS_LITERAL_STRING("example1.com"),
NS_LITERAL_STRING("example2.com"),
CreateDecryptor(NS_LITERAL_STRING("http://example1.com"),
NS_LITERAL_STRING("http://example2.com"),
false,
NS_LITERAL_CSTRING("test-storage"));
}
@ -742,8 +742,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
this, &GMPStorageTest::TestForgetThisSite_CollectSiteInfo);
Expect(NS_LITERAL_CSTRING("test-storage complete"), r);
CreateDecryptor(NS_LITERAL_STRING("example3.com"),
NS_LITERAL_STRING("example4.com"),
CreateDecryptor(NS_LITERAL_STRING("http://example3.com"),
NS_LITERAL_STRING("http://example4.com"),
false,
NS_LITERAL_CSTRING("test-storage"));
}
@ -771,7 +771,7 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
void TestForgetThisSite_CollectSiteInfo() {
nsAutoPtr<NodeInfo> siteInfo(
new NodeInfo(NS_LITERAL_CSTRING("example1.com")));
new NodeInfo(NS_LITERAL_CSTRING("http://example1.com")));
// Collect nodeIds that are expected to remain for later comparison.
EnumerateGMPStorageDir(NS_LITERAL_CSTRING("id"), NodeIdCollector(siteInfo));
// Invoke "Forget this site" on the main thread.
@ -861,8 +861,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
this, &GMPStorageTest::TestClearRecentHistory1_Clear);
Expect(NS_LITERAL_CSTRING("test-storage complete"), r);
CreateDecryptor(NS_LITERAL_STRING("example1.com"),
NS_LITERAL_STRING("example2.com"),
CreateDecryptor(NS_LITERAL_STRING("http://example1.com"),
NS_LITERAL_STRING("http://example2.com"),
false,
NS_LITERAL_CSTRING("test-storage"));
}
@ -883,8 +883,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
this, &GMPStorageTest::TestClearRecentHistory2_Clear);
Expect(NS_LITERAL_CSTRING("test-storage complete"), r);
CreateDecryptor(NS_LITERAL_STRING("example1.com"),
NS_LITERAL_STRING("example2.com"),
CreateDecryptor(NS_LITERAL_STRING("http://example1.com"),
NS_LITERAL_STRING("http://example2.com"),
false,
NS_LITERAL_CSTRING("test-storage"));
}
@ -905,8 +905,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
this, &GMPStorageTest::TestClearRecentHistory3_Clear);
Expect(NS_LITERAL_CSTRING("test-storage complete"), r);
CreateDecryptor(NS_LITERAL_STRING("example1.com"),
NS_LITERAL_STRING("example2.com"),
CreateDecryptor(NS_LITERAL_STRING("http://example1.com"),
NS_LITERAL_STRING("http://example2.com"),
false,
NS_LITERAL_CSTRING("test-storage"));
}
@ -1019,8 +1019,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
// Open decryptor on one, origin, write a record, and test that that
// record can't be read on another origin.
CreateDecryptor(NS_LITERAL_STRING("example3.com"),
NS_LITERAL_STRING("example4.com"),
CreateDecryptor(NS_LITERAL_STRING("http://example3.com"),
NS_LITERAL_STRING("http://example4.com"),
false,
update);
}
@ -1033,8 +1033,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
Expect(NS_LITERAL_CSTRING("retrieve crossOriginTestRecordId succeeded (length 0 bytes)"),
NS_NewRunnableMethod(this, &GMPStorageTest::SetFinished));
CreateDecryptor(NS_LITERAL_STRING("example5.com"),
NS_LITERAL_STRING("example6.com"),
CreateDecryptor(NS_LITERAL_STRING("http://example5.com"),
NS_LITERAL_STRING("http://example6.com"),
false,
NS_LITERAL_CSTRING("retrieve crossOriginTestRecordId"));
}
@ -1050,8 +1050,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
// open another, and test that record can be read, close decryptor,
// then send pb-last-context-closed notification, then open decryptor
// and check that it can't read that data; it should have been purged.
CreateDecryptor(NS_LITERAL_STRING("pb1.com"),
NS_LITERAL_STRING("pb2.com"),
CreateDecryptor(NS_LITERAL_STRING("http://pb1.com"),
NS_LITERAL_STRING("http://pb2.com"),
true,
NS_LITERAL_CSTRING("store pbdata test-pb-data"));
}
@ -1063,8 +1063,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
NS_NewRunnableMethod(this,
&GMPStorageTest::TestPBStorage_RecordRetrievedContinuation));
CreateDecryptor(NS_LITERAL_STRING("pb1.com"),
NS_LITERAL_STRING("pb2.com"),
CreateDecryptor(NS_LITERAL_STRING("http://pb1.com"),
NS_LITERAL_STRING("http://pb2.com"),
true,
NS_LITERAL_CSTRING("retrieve pbdata"));
}
@ -1077,8 +1077,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
NS_NewRunnableMethod(this,
&GMPStorageTest::SetFinished));
CreateDecryptor(NS_LITERAL_STRING("pb1.com"),
NS_LITERAL_STRING("pb2.com"),
CreateDecryptor(NS_LITERAL_STRING("http://pb1.com"),
NS_LITERAL_STRING("http://pb2.com"),
true,
NS_LITERAL_CSTRING("retrieve pbdata"));
}
@ -1108,20 +1108,20 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
void TestAsyncShutdownTimeout() {
// Create decryptors that timeout in their async shutdown.
// If the gtest hangs on shutdown, test fails!
CreateAsyncShutdownTimeoutGMP(NS_LITERAL_STRING("example7.com"),
NS_LITERAL_STRING("example8.com"),
CreateAsyncShutdownTimeoutGMP(NS_LITERAL_STRING("http://example7.com"),
NS_LITERAL_STRING("http://example8.com"),
&GMPStorageTest::TestAsyncShutdownTimeout2);
};
void TestAsyncShutdownTimeout2() {
CreateAsyncShutdownTimeoutGMP(NS_LITERAL_STRING("example9.com"),
NS_LITERAL_STRING("example10.com"),
CreateAsyncShutdownTimeoutGMP(NS_LITERAL_STRING("http://example9.com"),
NS_LITERAL_STRING("http://example10.com"),
&GMPStorageTest::TestAsyncShutdownTimeout3);
};
void TestAsyncShutdownTimeout3() {
CreateAsyncShutdownTimeoutGMP(NS_LITERAL_STRING("example11.com"),
NS_LITERAL_STRING("example12.com"),
CreateAsyncShutdownTimeoutGMP(NS_LITERAL_STRING("http://example11.com"),
NS_LITERAL_STRING("http://example12.com"),
&GMPStorageTest::SetFinished);
};
@ -1144,8 +1144,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
// Test that a GMP can write to storage during shutdown, and retrieve
// that written data in a subsequent session.
CreateDecryptor(NS_LITERAL_STRING("example13.com"),
NS_LITERAL_STRING("example14.com"),
CreateDecryptor(NS_LITERAL_STRING("http://example13.com"),
NS_LITERAL_STRING("http://example14.com"),
false,
update);
}
@ -1163,8 +1163,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
Expect(response,
NS_NewRunnableMethod(this, &GMPStorageTest::SetFinished));
CreateDecryptor(NS_LITERAL_STRING("example13.com"),
NS_LITERAL_STRING("example14.com"),
CreateDecryptor(NS_LITERAL_STRING("http://example13.com"),
NS_LITERAL_STRING("http://example14.com"),
false,
NS_LITERAL_CSTRING("retrieve-shutdown-token"));
}
@ -1176,8 +1176,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
Expect(NS_LITERAL_CSTRING("OP tests completed"),
NS_NewRunnableMethod(this, &GMPStorageTest::SetFinished));
CreateDecryptor(NS_LITERAL_STRING("example15.com"),
NS_LITERAL_STRING("example16.com"),
CreateDecryptor(NS_LITERAL_STRING("http://example15.com"),
NS_LITERAL_STRING("http://example16.com"),
false,
NS_LITERAL_CSTRING("test-op-apis"));
}
@ -1187,8 +1187,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
Expect(NS_LITERAL_CSTRING("retrieved plugin-voucher: gmp-fake placeholder voucher"),
NS_NewRunnableMethod(this, &GMPStorageTest::SetFinished));
CreateDecryptor(NS_LITERAL_STRING("example17.com"),
NS_LITERAL_STRING("example18.com"),
CreateDecryptor(NS_LITERAL_STRING("http://example17.com"),
NS_LITERAL_STRING("http://example18.com"),
false,
NS_LITERAL_CSTRING("retrieve-plugin-voucher"));
}
@ -1237,8 +1237,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
Expect(response, continuation);
}
CreateDecryptor(NS_LITERAL_STRING("foo.com"),
NS_LITERAL_STRING("bar.com"),
CreateDecryptor(NS_LITERAL_STRING("http://foo.com"),
NS_LITERAL_STRING("http://bar.com"),
aPrivateBrowsing,
Move(updates));
}
@ -1290,8 +1290,8 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
update.Append(longRecordName);
update.AppendLiteral(" ");
update.Append(data);
CreateDecryptor(NS_LITERAL_STRING("fuz.com"),
NS_LITERAL_STRING("baz.com"),
CreateDecryptor(NS_LITERAL_STRING("http://fuz.com"),
NS_LITERAL_STRING("http://baz.com"),
false,
update);
}