Skip to content

Commit d44a610

Browse files
committed
Stabilize unit test in Chrome. Media query doesn't seem to receive correct height right at onload time
1 parent 1950bc8 commit d44a610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/specs/BrowserSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ describe("Browser functions", function () {
186186
});
187187

188188
ifNotInPhantomJsIt("should support window.matchMedia() with 'height' media queries", function (done) {
189-
doc.documentElement.innerHTML = '<body onload="setTimeout(function () {document.body.innerHTML = window.matchMedia(\'(min-height: 123px)\').matches; }, 0);"></body>';
189+
doc.documentElement.innerHTML = '<body onload="setTimeout(function () {document.body.innerHTML = window.matchMedia(\'(min-height: 123px)\').matches; }, 10);"></body>';
190190

191191
browser.executeJavascript(doc.documentElement, optionsWithViewport(10, 123)).then(function (result) {
192192
expect(result.document.body.innerHTML).toEqual('true');

0 commit comments

Comments
 (0)