Backed out changeset a0faa1e1837e (bug 869903) for orange on Linux mochitests

This commit is contained in:
Michael Wu 2013-06-06 20:49:31 -04:00
parent c80e387802
commit 14c6ab452d
4 changed files with 2 additions and 19 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

@ -69,7 +69,6 @@ MOCHITEST_FILES = \
file_browserElement_XFrameOptionsAllowFrom.html \
file_browserElement_XFrameOptionsAllowFrom.sjs \
browserElement_FirstPaint.js \
file_browserElement_FirstPaint.html \
test_browserElement_inproc_FirstPaint.html \
browserElement_NextPaint.js \
test_browserElement_inproc_NextPaint.html \

View File

@ -10,9 +10,7 @@ browserElementTestHelpers.addPermission();
function runTest() {
var iframe = document.createElement('iframe');
var iframe2 = document.createElement('iframe');
SpecialPowers.wrap(iframe).mozbrowser = true;
SpecialPowers.wrap(iframe2).mozbrowser = true;
var gotFirstPaint = false;
var gotFirstLocationChange = false;
@ -20,8 +18,6 @@ function runTest() {
ok(!gotFirstPaint, "Got only one first paint.");
gotFirstPaint = true;
is(e.detail.backgroundColor, "transparent", "Got the expected background color.");
if (gotFirstLocationChange) {
iframe.src = browserElementTestHelpers.emptyPage1 + '?2';
}
@ -35,16 +31,10 @@ function runTest() {
}
}
else if (e.detail.endsWith('?2')) {
document.body.appendChild(iframe2);
SimpleTest.finish();
}
});
iframe2.addEventListener('mozbrowserfirstpaint', function(e) {
is(e.detail.backgroundColor, "rgb(0, 128, 0)", "Got the expected background color.");
SimpleTest.finish();
});
iframe2.src = 'http://example.com/tests/dom/browser-element/mochitest/file_browserElement_FirstPaint.html';
document.body.appendChild(iframe);
iframe.src = browserElementTestHelpers.emptyPage1;

View File

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