зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1143537 - Part 2: Test descriptor getters for CSS-connected FontFaces when the descriptor isn't present. r=jdaggett
This commit is contained in:
Родитель
a1e1bf9cc2
Коммит
222af9be41
|
@ -828,6 +828,26 @@ function runTest() {
|
|||
document.fonts.delete(face);
|
||||
ok(!document.fonts.has(face), "previously CSS-connected FontFace should be able to be removed from document.fonts (TEST 33)");
|
||||
|
||||
}).then(function() {
|
||||
|
||||
// (TEST 34) Test that descriptor getters for unspecified descriptors on
|
||||
// CSS-connected FontFace objects return their default values.
|
||||
var style = document.querySelector("style");
|
||||
var ruleText = "@font-face { font-family: something; src: url(x); }";
|
||||
|
||||
style.textContent = ruleText;
|
||||
document.body.offsetTop;
|
||||
|
||||
var all = Array.from(document.fonts);
|
||||
var face = all[0];
|
||||
|
||||
Object.keys(defaultValues).forEach(function(aDesc) {
|
||||
is(face[aDesc], defaultValues[aDesc], "FontFace should return default value for " + aDesc + " (TEST 34)");
|
||||
});
|
||||
|
||||
style.textContent = "";
|
||||
document.body.offsetTop;
|
||||
|
||||
}).then(function() {
|
||||
|
||||
// (TEST LAST) Test that a pending style sheet load prevents
|
||||
|
|
Загрузка…
Ссылка в новой задаче