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

Side by Side Diff: tools/telemetry/telemetry/core/tab_unittest.py

Issue 971613004: Telemetry: Disable TabTest:testTabIsAlive on Android due to its failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 The Chromium Authors. All rights reserved. 1 # Copyright 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 4
5 import logging 5 import logging
6 import tempfile 6 import tempfile
7 7
8 from telemetry import decorators 8 from telemetry import decorators
9 from telemetry.image_processing import image_util 9 from telemetry.image_processing import image_util
10 from telemetry.image_processing import rgba_color 10 from telemetry.image_processing import rgba_color
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 renderer_thread = timeline_model.GetRendererThreadFromTabId( 157 renderer_thread = timeline_model.GetRendererThreadFromTabId(
158 second_tab.id) 158 second_tab.id)
159 second_tab_markers = [ 159 second_tab_markers = [
160 renderer_thread.IterAllSlicesOfName('second-tab-marker')] 160 renderer_thread.IterAllSlicesOfName('second-tab-marker')]
161 self.assertEquals(1, len(second_tab_markers)) 161 self.assertEquals(1, len(second_tab_markers))
162 162
163 # Third tab wasn't available when we start tracing, so there is no 163 # Third tab wasn't available when we start tracing, so there is no
164 # renderer_thread corresponding to it in the the trace. 164 # renderer_thread corresponding to it in the the trace.
165 self.assertIs(None, timeline_model.GetRendererThreadFromTabId(third_tab.id)) 165 self.assertIs(None, timeline_model.GetRendererThreadFromTabId(third_tab.id))
166 166
167 @decorators.Disabled('android') # https://crbug.com/463933
167 def testTabIsAlive(self): 168 def testTabIsAlive(self):
168 self.assertEquals(self._tab.url, 'about:blank') 169 self.assertEquals(self._tab.url, 'about:blank')
169 self.assertTrue(self._tab.IsAlive()) 170 self.assertTrue(self._tab.IsAlive())
170 171
171 self._tab.Navigate(self.UrlOfUnittestFile('blank.html')) 172 self._tab.Navigate(self.UrlOfUnittestFile('blank.html'))
172 self.assertTrue(self._tab.IsAlive()) 173 self.assertTrue(self._tab.IsAlive())
173 174
174 self.assertRaises(exceptions.DevtoolsTargetCrashException, 175 self.assertRaises(exceptions.DevtoolsTargetCrashException,
175 lambda: self._tab.Navigate(self.UrlOfUnittestFile('chrome://crash'))) 176 lambda: self._tab.Navigate(self.UrlOfUnittestFile('chrome://crash')))
176 self.assertFalse(self._tab.IsAlive()) 177 self.assertFalse(self._tab.IsAlive())
(...skipping 18 matching lines...) Expand all
195 assert screenshot is not None 196 assert screenshot is not None
196 image_util.GetPixelColor( 197 image_util.GetPixelColor(
197 screenshot, 0 * pixel_ratio, 0 * pixel_ratio).AssertIsRGB( 198 screenshot, 0 * pixel_ratio, 0 * pixel_ratio).AssertIsRGB(
198 0, 255, 0, tolerance=2) 199 0, 255, 0, tolerance=2)
199 image_util.GetPixelColor( 200 image_util.GetPixelColor(
200 screenshot, 31 * pixel_ratio, 31 * pixel_ratio).AssertIsRGB( 201 screenshot, 31 * pixel_ratio, 31 * pixel_ratio).AssertIsRGB(
201 0, 255, 0, tolerance=2) 202 0, 255, 0, tolerance=2)
202 image_util.GetPixelColor( 203 image_util.GetPixelColor(
203 screenshot, 32 * pixel_ratio, 32 * pixel_ratio).AssertIsRGB( 204 screenshot, 32 * pixel_ratio, 32 * pixel_ratio).AssertIsRGB(
204 255, 255, 255, tolerance=2) 205 255, 255, 255, tolerance=2)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698