mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug 967862 - HTTP cache v2: fix xpcshell tests to be independent on difference between use-new-cache in CacheObserver and in preferences, r=michal
This commit is contained in:
parent
c5f606dd7b
commit
97ca7571c8
@ -1,12 +1,12 @@
|
||||
function run_test()
|
||||
{
|
||||
do_get_profile();
|
||||
|
||||
if (!newCacheBackEndUsed()) {
|
||||
do_check_true(true, "This test doesn't run when the old cache back end is used since the behavior is different");
|
||||
return;
|
||||
}
|
||||
|
||||
do_get_profile();
|
||||
|
||||
// Add entry to the memory storage
|
||||
var mc = new MultipleCallbacks(5, function() {
|
||||
// Check it's there by visiting the storage
|
||||
|
@ -1,12 +1,12 @@
|
||||
function run_test()
|
||||
{
|
||||
do_get_profile();
|
||||
|
||||
if (!newCacheBackEndUsed()) {
|
||||
do_check_true(true, "This test doesn't run when the old cache back end is used since the behavior is different");
|
||||
return;
|
||||
}
|
||||
|
||||
do_get_profile();
|
||||
|
||||
asyncOpenCacheEntry("http://b/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null,
|
||||
new OpenCallback(NEW|DOOMED, "b1m", "b1d", function(entry) {
|
||||
entry.asyncDoom(
|
||||
|
@ -1,12 +1,12 @@
|
||||
function run_test()
|
||||
{
|
||||
do_get_profile();
|
||||
|
||||
if (!newCacheBackEndUsed()) {
|
||||
do_check_true(true, "This test doesn't run when the old cache back end is used since the behavior is different");
|
||||
return;
|
||||
}
|
||||
|
||||
do_get_profile();
|
||||
|
||||
var mc = new MultipleCallbacks(3, function() {
|
||||
var storage = getCacheStorage("disk");
|
||||
storage.asyncEvictStorage(
|
||||
|
@ -1,12 +1,12 @@
|
||||
function run_test()
|
||||
{
|
||||
do_get_profile();
|
||||
|
||||
if (!newCacheBackEndUsed()) {
|
||||
do_check_true(true, "This test doesn't run when the old cache back end is used since the behavior is different");
|
||||
return;
|
||||
}
|
||||
|
||||
do_get_profile();
|
||||
|
||||
// Open for write, write
|
||||
asyncOpenCacheEntry("http://200/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null,
|
||||
new OpenCallback(NEW, "21m", "21d", function(entry) {
|
||||
|
@ -1,12 +1,12 @@
|
||||
function run_test()
|
||||
{
|
||||
do_get_profile();
|
||||
|
||||
if (!newCacheBackEndUsed()) {
|
||||
do_check_true(true, "This test doesn't run when the old cache back end is used since the behavior is different");
|
||||
return;
|
||||
}
|
||||
|
||||
do_get_profile();
|
||||
|
||||
// Open for write, write but expect it to fail, since other callback will recreate (and doom)
|
||||
// the first entry before it opens output stream (note: in case of problems the DOOMED flag
|
||||
// can be removed, it is not the test failure when opening the output stream on recreated entry.
|
||||
|
@ -1,12 +1,12 @@
|
||||
function run_test()
|
||||
{
|
||||
do_get_profile();
|
||||
|
||||
if (!newCacheBackEndUsed()) {
|
||||
do_check_true(true, "This test doesn't run when the old cache back end is used since the behavior is different");
|
||||
return;
|
||||
}
|
||||
|
||||
do_get_profile();
|
||||
|
||||
// Open for write, write
|
||||
asyncOpenCacheEntry("http://r206/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null,
|
||||
new OpenCallback(NEW, "206m", "206part1-", function(entry) {
|
||||
|
@ -1,12 +1,12 @@
|
||||
function run_test()
|
||||
{
|
||||
do_get_profile();
|
||||
|
||||
if (!newCacheBackEndUsed()) {
|
||||
do_check_true(true, "This test doesn't run when the old cache back end is used since the behavior is different");
|
||||
return;
|
||||
}
|
||||
|
||||
do_get_profile();
|
||||
|
||||
// Open for write, write
|
||||
asyncOpenCacheEntry("http://r200/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null,
|
||||
new OpenCallback(NEW, "200m1", "200part1a-", function(entry) {
|
||||
|
@ -2,13 +2,13 @@ Components.utils.import('resource://gre/modules/LoadContextInfo.jsm');
|
||||
|
||||
function run_test()
|
||||
{
|
||||
do_get_profile();
|
||||
|
||||
if (!newCacheBackEndUsed()) {
|
||||
do_check_true(true, "This test doesn't run when the old cache back end is used since the behavior is different");
|
||||
return;
|
||||
}
|
||||
|
||||
do_get_profile();
|
||||
|
||||
// Create and check an entry anon disk storage
|
||||
asyncOpenCacheEntry("http://anon1/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, LoadContextInfo.anonymous,
|
||||
new OpenCallback(NEW, "an1", "an1", function(entry) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user