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

Unified Diff: tools/telemetry/telemetry/core/tab.py

Issue 127373003: [Telemetry] Some fixups in speed index calculation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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/core/platform/android_platform_backend.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/tab.py
diff --git a/tools/telemetry/telemetry/core/tab.py b/tools/telemetry/telemetry/core/tab.py
index a4fa2a622610cae84ac9fc57de884dc9454ff94a..799f24682da5c7dc3cd34b6ab08fb4da4ec11ff4 100644
--- a/tools/telemetry/telemetry/core/tab.py
+++ b/tools/telemetry/telemetry/core/tab.py
@@ -108,7 +108,7 @@ class Tab(web_contents.WebContents):
screen.style.left = '0';
screen.style.width = '100%%';
screen.style.height = '100%%';
- screen.style.zindex = '2147483638';
+ screen.style.zIndex = '2147483638';
document.body.appendChild(screen);
requestAnimationFrame(function() {
screen.has_painted = true;
@@ -139,7 +139,7 @@ class Tab(web_contents.WebContents):
for timestamp, bmp in self.browser.platform.StopVideoCapture():
if not content_box:
content_box, pixel_count = bmp.GetBoundingBox(
- bitmap.RgbaColor(*_CONTENT_FLASH_COLOR), tolerance=4)
+ bitmap.RgbaColor(*_CONTENT_FLASH_COLOR), tolerance=8)
assert content_box, 'Failed to find tab contents in first video frame.'
@@ -148,7 +148,7 @@ class Tab(web_contents.WebContents):
# awry with our bounding box calculation.
assert content_box[2] > 200 and content_box[3] > 200, \
'Unexpectedly small tab contents.'
- assert pixel_count > 0.75 * bmp.width * bmp.height, \
+ assert pixel_count > 0.9 * content_box[2] * content_box[3], \
'Low count of pixels in tab contents matching expected color.'
# Since Telemetry doesn't know how to resize the window, we assume
« no previous file with comments | « tools/telemetry/telemetry/core/platform/android_platform_backend.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698