Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: tools/telemetry/telemetry/inspector_page_unittest.py

Issue 11931026: Revert 177087. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/inspector_page.py ('k') | tools/telemetry/telemetry/inspector_runtime.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/inspector_page_unittest.py
===================================================================
--- tools/telemetry/telemetry/inspector_page_unittest.py (revision 177224)
+++ tools/telemetry/telemetry/inspector_page_unittest.py (working copy)
@@ -53,3 +53,25 @@
self._tab.WaitForDocumentReadyStateToBeComplete()
self._tab.runtime.Execute('document.cookie="foo=bar"')
self.assertEquals(self._tab.page.GetCookieByName('foo'), 'bar')
+
+
+class GpuInspectorPageTest(tab_test_case.TabTestCase):
+ def setUp(self):
+ self._extra_browser_args = ['--enable-gpu-benchmarking']
+ super(GpuInspectorPageTest, self).setUp()
+
+ def testScreenshot(self):
+ unittest_data_dir = os.path.join(os.path.dirname(__file__),
+ '..', 'unittest_data')
+ self._browser.SetHTTPServerDirectory(unittest_data_dir)
+ self._tab.page.Navigate(
+ self._browser.http_server.UrlOf('green_rect.html'))
+ self._tab.WaitForDocumentReadyStateToBeComplete()
+
+ # Skip this test if running against a browser without screenshot support
+ if self._tab.page.screenshot_supported:
+ screenshot = self._tab.page.Screenshot(5)
+ assert screenshot
+ screenshot.GetPixelColor(0, 0).AssertIsRGB(0, 255, 0)
+ screenshot.GetPixelColor(31, 31).AssertIsRGB(0, 255, 0)
+ screenshot.GetPixelColor(32, 32).AssertIsRGB(255, 255, 255)
« no previous file with comments | « tools/telemetry/telemetry/inspector_page.py ('k') | tools/telemetry/telemetry/inspector_runtime.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698