OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 import os | 4 import os |
5 | 5 |
6 from telemetry import tab_test_case | 6 from telemetry import tab_test_case |
7 from telemetry import tab_crash_exception | 7 from telemetry import tab_crash_exception |
8 from telemetry import util | 8 from telemetry import util |
9 | 9 |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 self._browser.http_server.UrlOf('green_rect.html')) | 57 self._browser.http_server.UrlOf('green_rect.html')) |
58 self._tab.WaitForDocumentReadyStateToBeComplete() | 58 self._tab.WaitForDocumentReadyStateToBeComplete() |
59 | 59 |
60 # Skip this test if running against a browser without screenshot support | 60 # Skip this test if running against a browser without screenshot support |
61 if self._tab.screenshot_supported: | 61 if self._tab.screenshot_supported: |
62 screenshot = self._tab.Screenshot(5) | 62 screenshot = self._tab.Screenshot(5) |
63 assert screenshot | 63 assert screenshot |
64 screenshot.GetPixelColor(0, 0).AssertIsRGB(0, 255, 0) | 64 screenshot.GetPixelColor(0, 0).AssertIsRGB(0, 255, 0) |
65 screenshot.GetPixelColor(31, 31).AssertIsRGB(0, 255, 0) | 65 screenshot.GetPixelColor(31, 31).AssertIsRGB(0, 255, 0) |
66 screenshot.GetPixelColor(32, 32).AssertIsRGB(255, 255, 255) | 66 screenshot.GetPixelColor(32, 32).AssertIsRGB(255, 255, 255) |
OLD | NEW |