зеркало из https://github.com/mozilla/pjs.git
Bug 475441. Make the media cache size really small while we're running mochitests, to give the cache code a thorough workout. r=doublec
This commit is contained in:
Родитель
e62f0b9aa8
Коммит
164e82b2b6
|
@ -245,6 +245,7 @@ user_pref("network.manage-offline-status", false);
|
|||
user_pref("security.default_personal_cert", "Select Automatically"); // Need to client auth test be w/o any dialogs
|
||||
user_pref("network.http.prompt-temp-redirect", false);
|
||||
user_pref("svg.smil.enabled", true); // Needed for SMIL mochitests until bug 482402 lands
|
||||
user_pref("media.cache_size", 100);
|
||||
|
||||
user_pref("camino.warn_when_closing", false); // Camino-only, harmless to others
|
||||
"""
|
||||
|
|
|
@ -56,6 +56,7 @@ _TEST_FILES = \
|
|||
test_readyState.html \
|
||||
test_seek2.html \
|
||||
test_volume.html \
|
||||
use_large_cache.js \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_OGG
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<pre id="test">
|
||||
<script src="use_large_cache.js"></script>
|
||||
<script class="testbody" type="text/javascript">
|
||||
var completed = false;
|
||||
var load_count = 0;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<pre id="test">
|
||||
<script src="use_large_cache.js"></script>
|
||||
<script class="testbody" type="text/javascript">
|
||||
// Test progress events with wav backend
|
||||
var completed = false;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<pre id="test">
|
||||
<script src="use_large_cache.js"></script>
|
||||
<script class="testbody" type="text/javascript">
|
||||
// Same as test_progress1 but uses a smaller file to test resource loaded
|
||||
// before metadata loaded is fired.
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<pre id="test">
|
||||
<script src="use_large_cache.js"></script>
|
||||
<script class="testbody" type="text/javascript">
|
||||
// Test progress events with wav backend
|
||||
// Same as test_progress2 but uses a smaller file to test resource loaded
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
(function() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
// Set cache size to something large
|
||||
var prefService = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefService);
|
||||
var branch = prefService.getBranch("media.");
|
||||
var oldSize = branch.getIntPref("cache_size");
|
||||
branch.setIntPref("cache_size", 40000);
|
||||
|
||||
window.addEventListener("unload", function() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
branch.setIntPref("cache_size", oldSize);
|
||||
}, false);
|
||||
})();
|
|
@ -16,6 +16,24 @@
|
|||
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
// Use a large cache for this test, to stop it hanging due to the cache
|
||||
// filling up
|
||||
(function() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
// Set cache size to something large
|
||||
var prefService = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefService);
|
||||
var branch = prefService.getBranch("media.");
|
||||
var oldSize = branch.getIntPref("cache_size");
|
||||
branch.setIntPref("cache_size", 40000);
|
||||
|
||||
window.addEventListener("unload", function() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
branch.setIntPref("cache_size", oldSize);
|
||||
}, false);
|
||||
})();
|
||||
|
||||
/*
|
||||
* Positions of the UI elements, relative to the upper-left corner of the
|
||||
* <video> box.
|
||||
|
|
Загрузка…
Ссылка в новой задаче