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

Unified Diff: tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py

Issue 495393002: Revert of Remove the assertion that number of expected tabs must equal to number of live tabs temporarily. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py b/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py
index 80e852fec55ab9b1615ec7f067a14baa39c298d3..95854c36057d6af8a293ecff6d3435d1fecf384f 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import logging
import urllib2
from telemetry.core import exceptions
@@ -68,16 +67,7 @@
'Number of opening tabs is %i, whereas number of live tabs is %i, '
'Tried to get tab at index %i but this may not return the right tab.'
% (self._num_expected_tabs, len(self), index))
- # TODO(nednguyen): fix this by adding wait in DidStartBrowser to make sure
- # that all the tabs have been loaded.
- if self._num_expected_tabs != len(self):
- logging.warning(
- 'Number of expected tabs was not intialized correctly (Num expected '
- 'tabs is %i, whereas number of live tabs is %i). This is probably due'
- ' to the browser did not wait long enough for all tabs to be loaded '
- ' before intializing number of expected tabs.' %
- (self._num_expected_tabs, len(self)))
- self._num_expected_tabs = len(self)
+ assert self._num_expected_tabs == len(self)
return super(TabListBackend, self).__getitem__(index)
« 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