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 #32612 from mcav/icon-size-test
Browse files Browse the repository at this point in the history
Bug 1215476 - [Test] task_manager_icon_test Marionette test failing l… r=albertopq
  • Loading branch information
mcav committed Oct 26, 2015
2 parents 977db6c + 1c0b78c commit 352aab8
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions apps/system/test/marionette/task_manager_icons_test.js
Expand Up @@ -82,6 +82,23 @@ marionette('Task Manager - Icons', function() {
firefoxApp.launch();
system.goHome();
system.waitUntilScreenshotable(firefoxApp.iframe);

client.executeScript(function() {
var win = window.wrappedJSObject;
win._originalDPR =
Object.getOwnPropertyDescriptor(win, 'devicePixelRatio');
Object.defineProperty(win, 'devicePixelRatio', {
configurable: true,
get: function() { return 1; }
});
});
});

teardown(function() {
client.executeScript(function() {
var win = window.wrappedJSObject;
Object.defineProperty(win, 'devicePixelRatio', win._originalDPR);
});
});

test('use icon from app manifest', function() {
Expand All @@ -99,8 +116,8 @@ marionette('Task Manager - Icons', function() {

var actualColor = getElementColor(icon);
var actualSize = iconColorToSize[actualColor];
assert(actualColor === expectedColor);
assert(actualSize === expectedSize);
assert.equal(actualColor, expectedColor);
assert.equal(actualSize, expectedSize);
});
});

Expand Down

0 comments on commit 352aab8

Please sign in to comment.