Bug 1221758 - don't run cache2 tests when cache2 isn't used. r=michal.novotny

Was causing test failures for Thunderbird where cache2 isn't in use yet.
This commit is contained in:
Magnus Melin 2015-11-12 22:12:50 +02:00
Родитель 57888510df
Коммит 12d47d0d77
6 изменённых файлов: 23 добавлений и 1 удалений

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

@ -1,6 +1,10 @@
function run_test()
{
do_get_profile();
if (!newCacheBackEndUsed()) {
do_check_true(true, "This test checks only cache2 specific behavior.");
return;
}
// Open for write, write
asyncOpenCacheEntry("http://a/", "pin", Ci.nsICacheStorage.OPEN_TRUNCATE, LoadContextInfo.default,

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

@ -1,6 +1,10 @@
function run_test()
{
do_get_profile();
if (!newCacheBackEndUsed()) {
do_check_true(true, "This test checks only cache2 specific behavior.");
return;
}
var lci = LoadContextInfo.default;
// Open a pinned entry for write, write

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

@ -26,6 +26,11 @@ function log_(msg) { if (true) dump(">>>>>>>>>>>>> " + msg + "\n"); }
function run_test()
{
do_get_profile();
if (!newCacheBackEndUsed()) {
do_check_true(true, "This test checks only cache2 specific behavior.");
return;
}
var lci = LoadContextInfo.default;
var testingInterface = get_cache_service().QueryInterface(Ci.nsICacheTesting);
do_check_true(testingInterface);

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

@ -22,6 +22,10 @@ function log_(msg) { if (true) dump(">>>>>>>>>>>>> " + msg + "\n"); }
function run_test()
{
do_get_profile();
if (!newCacheBackEndUsed()) {
do_check_true(true, "This test checks only cache2 specific behavior.");
return;
}
var lci = LoadContextInfo.default;
var testingInterface = get_cache_service().QueryInterface(Ci.nsICacheTesting);
do_check_true(testingInterface);

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

@ -89,6 +89,10 @@ function run_all_tests() {
var gTests;
function run_test() {
do_get_profile();
if (!newCacheBackEndUsed()) {
do_check_true(true, "This test checks only cache2 specific behavior.");
return;
}
do_test_pending();
httpserv = new HttpServer();
httpserv.registerPathHandler("/cached", cached_handler);

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

@ -1,3 +1,4 @@
function run_test() {
run_test_in_child("../unit/head_cache2.js");
run_test_in_child("../unit/test_cache_jar.js");
}