Bug 1163877 - Part 4: Tests. r=jdaggett

This commit is contained in:
Cameron McCormack 2015-10-16 17:10:14 +11:00
parent de8322b95c
commit 6c12fe2dd9
8 changed files with 416 additions and 228 deletions

View File

@ -0,0 +1,3 @@
<!DOCTYPE html>
<iframe id=a src=multiple-sets-frame-ref.html></iframe>
<iframe id=b src=multiple-sets-frame-ref.html></iframe>

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html class=reftest-wait>
<body onload=step()>
<iframe id=a src=multiple-sets-frame.html></iframe>
<iframe id=b src=multiple-sets-frame.html></iframe>
<script>
var events = 2; // wait for load event and MozReftestInvalidate
function step() {
if (--events == 0) {
var a = document.getElementById("a");
var b = document.getElementById("b");
var a_win = a.contentWindow;
var b_win = b.contentWindow;
var a_doc = a.contentDocument;
var b_doc = b.contentDocument;
var face = new a_win.FontFace("Ahem", "url(../fonts/Ahem.ttf)");
a_doc.fonts.add(face);
b_doc.fonts.add(face);
face.load().then(function() {
document.documentElement.className = "";
});
}
}
window.addEventListener("MozReftestInvalidate", step, false);
</script>

View File

@ -0,0 +1,8 @@
<!DOCTYPE html>
<style>
@font-face {
font-family: Ahem;
src: url(../fonts/Ahem.ttf);
}
</style>
<p style="font: 16px Ahem">Hello</p>

View File

@ -0,0 +1,2 @@
<!DOCTYPE html>
<p style="font: 16px Ahem">Hello</p>

View File

@ -3,6 +3,7 @@ default-preferences pref(layout.css.font-loading-api.enabled,true)
HTTP(..) == dynamic-insert-1.html dynamic-insert-1-ref.html
HTTP(..) == dynamic-remove-1.html dynamic-remove-1-ref.html
HTTP(..) == ex-unit-1.html ../font-face/ex-unit-1-ref.html
HTTP(..) == multiple-sets-1.html multiple-sets-1-ref.html
HTTP(..) == name-collision.html ../font-face/name-collision-ref.html
HTTP(..) == order-1.html ../font-face/order-1-ref.html
HTTP(..) == src-list-1.html ../font-face/src-list-1-ref.html

View File

@ -0,0 +1,2 @@
<!DOCTYPE html>
<style></style>

View File

@ -171,7 +171,9 @@ support-files = flexbox_layout_testcases.js
[test_font_family_parsing.html]
[test_font_feature_values_parsing.html]
[test_font_loading_api.html]
support-files = BitPattern.woff
support-files =
BitPattern.woff
file_font_loading_api_vframe.html
[test_garbage_at_end_of_declarations.html]
[test_grid_container_shorthands.html]
[test_grid_item_shorthands.html]

File diff suppressed because it is too large Load Diff