Skip to content

Commit

Permalink
Tests: drop is_ie conditional when checking for webp and devicepixelr…
Browse files Browse the repository at this point in the history
…atio. Was catching Chrome/Mac
  • Loading branch information
lilith committed Jan 16, 2015
1 parent 1ccdb01 commit 6e49565
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions test/wd/test_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,18 @@ test.elements = function(is_ie){
// Calculate halfsize and halfsize_src
before(function(done) {
var chain = this.browser;
if (is_ie){
dpr = 1;
quality = 90;
format="&format=jpg&quality=90";
}else{
chain = chain
.safeExecute('[window.devicePixelRatio || 1, window.slimmage && window.slimmage.webp]')
.then(function(val){
dpr = val[0];
if (dpr > 1.49){
quality = val[1] ? 65 : 80;
}else{
quality = val[1] ? 78 : 90;
}
format = val[1] ? "&format=webp&quality=" + quality : "&format=jpg&quality=" + quality;
});
}
chain = chain
.safeExecute('[window.devicePixelRatio || 1, window.slimmage && window.slimmage.webp]')
.then(function(val){
dpr = val[0];
if (dpr > 1.49){
quality = val[1] ? 65 : 80;
}else{
quality = val[1] ? 78 : 90;
}
format = val[1] ? "&format=webp&quality=" + quality : "&format=jpg&quality=" + quality;
});


chain.elementById('container')
.getSize()
Expand Down

0 comments on commit 6e49565

Please sign in to comment.