mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 883921 - Make testFindInPage close PaintedSurface. r=gbrown
--HG-- extra : rebase_source : 9531f3c74e01edb1fad635f9ced333362daed527
This commit is contained in:
parent
215edf6590
commit
abc25d8d70
@ -27,14 +27,22 @@ public class testFindInPage extends PixelTest {
|
||||
findText("Robocoop", 3); // This will be close enough to existing text to test that search finds just what it should
|
||||
PaintedSurface painted = waitForPaint(paintExpecter);
|
||||
paintExpecter.unregisterListener();
|
||||
mAsserter.ispixel(painted.getPixelAt(width,height), 255, 0, 0, "Pixel at " + String.valueOf(width) + "," + String.valueOf(height));
|
||||
try {
|
||||
mAsserter.ispixel(painted.getPixelAt(width,height), 255, 0, 0, "Pixel at " + String.valueOf(width) + "," + String.valueOf(height));
|
||||
} finally {
|
||||
painted.close();
|
||||
}
|
||||
|
||||
// Search that finds matches and therefor pans the page
|
||||
paintExpecter = mActions.expectPaint();
|
||||
findText("Robocop", 3);
|
||||
painted = waitForPaint(paintExpecter);
|
||||
paintExpecter.unregisterListener();
|
||||
mAsserter.isnotpixel(painted.getPixelAt(width,height), 255, 0, 0, "Pixel at " + String.valueOf(width) + "," + String.valueOf(height));
|
||||
try {
|
||||
mAsserter.isnotpixel(painted.getPixelAt(width,height), 255, 0, 0, "Pixel at " + String.valueOf(width) + "," + String.valueOf(height));
|
||||
} finally {
|
||||
painted.close();
|
||||
}
|
||||
}
|
||||
|
||||
public void findText(String text, int nrOfMatches){
|
||||
|
Loading…
Reference in New Issue
Block a user