Skip to content

Commit

Permalink
Make test render checker work correctly in non-Firefox browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 6, 2016
1 parent f5b615a commit 0afcb0f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/renderchecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ function addComparison(id,rendered,expected,w,h) {
var e = document.getElementById(id);

var div = document.createElement("DIV");
div.style = "margin: 0 auto; font-size: 0;";
div.style.margin = "0 auto";
div.style.fontSize = "0";
e.appendChild(div);

var div0 = document.createElement("DIV");
div0.style = "font-size: 0; position: relative;";
div0.style.fontSize = "0";
div0.style.position = "relative";
div.appendChild(div0);

var img = document.createElement("IMG");
Expand All @@ -17,6 +19,7 @@ function addComparison(id,rendered,expected,w,h) {
div0.appendChild(img);

var div1 = document.createElement("DIV");
div1.setAttribute("style", "pointer-events: none");
div1.style.backgroundImage = "url('" + expected + "')";
div1.style.backgroundSize = "cover";
div1.style.position = "absolute";
Expand Down

0 comments on commit 0afcb0f

Please sign in to comment.