Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #10737 from comoyo/bug_889055
Browse files Browse the repository at this point in the history
Bug 889055 - Render UI tests fail in TBPL. r=RudyL
  • Loading branch information
janjongboom committed Jul 2, 2013
2 parents 1b6752d + f09790c commit e8fb583
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/keyboard/test/unit/render_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ suite('Renderer', function() {

_iw = Object.getOwnPropertyDescriptor(Window.prototype, 'innerWidth');
_ih = Object.getOwnPropertyDescriptor(Window.prototype, 'innerHeight');

// we're testing layout stuff, so make sure to also have width/height
// in a headless browser
Object.defineProperty(Window.prototype, 'innerWidth',
makeDescriptor(300));
Object.defineProperty(ime, 'clientWidth',
makeDescriptor(300));
Object.defineProperty(Window.prototype, 'innerHeight',
makeDescriptor(400));
});

teardown(function() {
Expand Down Expand Up @@ -88,6 +97,7 @@ suite('Renderer', function() {
function(el) {
return el.clientWidth;
});

assert.notEqual(all[0], 0);
assert.equal(all.every(function(el) {
return el === all[0];
Expand Down

0 comments on commit e8fb583

Please sign in to comment.