Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / script-tests / font-family-fallback-reset.js
blobe11836a837eded4ee562872afce2efe3a816805e
1 description("Setting a new font-family should reset the fallback list to empty before adding the new family.");
3 var wrapperDiv = document.createElement('div');
4 document.body.appendChild(wrapperDiv)
6 wrapperDiv.innerHTML =
7 '<div id="outerDiv" style="font-family: courier new, cursive;">' +
8 'should be Courier New' +
9 '<div id="timesDiv" style="font-family: foo;">should be Times (default font)</div>' +
10 '<div id="cursiveDiv" style="font-family: cursive;">should be cursive</div>' +
11 '</div>';
13 shouldBeEqualToString("window.getComputedStyle(outerDiv, null).fontFamily", "'courier new', cursive");
14 shouldBeEqualToString("window.getComputedStyle(timesDiv, null).fontFamily", "foo");
15 shouldBeEqualToString("window.getComputedStyle(cursiveDiv, null).fontFamily", "cursive");
17 document.body.removeChild(wrapperDiv);