Backout bug 869903 for test failures

This commit is contained in:
Michael Wu 2013-06-04 21:59:34 -04:00
commit 54de48fdf4
3 changed files with 4 additions and 14 deletions

View File

@ -187,9 +187,7 @@ BrowserElementChild.prototype = {
// Registers a MozAfterPaint handler for the very first paint.
this._addMozAfterPaintHandler(function () {
let bgColor = content.getComputedStyle(content.document.body)
.getPropertyValue('background-color');
sendAsyncMsg('firstpaint', {backgroundColor: bgColor});
sendAsyncMsg('firstpaint');
});
let self = this;

View File

@ -14,15 +14,12 @@ function runTest() {
var gotFirstPaint = false;
var gotFirstLocationChange = false;
var secondTestPage = 'file_browserElement_FirstPaint.html';
iframe.addEventListener('mozbrowserfirstpaint', function(e) {
ok(!gotFirstPaint, "Got only one first paint.");
gotFirstPaint = true;
is(e.detail.backgroundColor, "transparent", "Got the expected background color.");
if (gotFirstLocationChange) {
iframe.src = secondTestPage;
iframe.src = browserElementTestHelpers.emptyPage1 + '?2';
}
});
@ -30,11 +27,10 @@ function runTest() {
if (e.detail == browserElementTestHelpers.emptyPage1) {
gotFirstLocationChange = true;
if (gotFirstPaint) {
iframe.src = secondTestPage;
iframe.src = browserElementTestHelpers.emptyPage1 + '?2';
}
}
else if (e.detail == secondTestPage) {
is(e.detail.backgroundColor, "rgb(0,255,0)", "Got the expected background color.");
else if (e.detail.endsWith('?2')) {
SimpleTest.finish();
}
});

View File

@ -1,4 +0,0 @@
<html>
<body style="background-color:green;">
</body>
</html>