summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornednguyen@google.com <nednguyen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-22 16:24:11 +0000
committernednguyen@google.com <nednguyen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-22 16:25:40 +0000
commitf5a3de8ad37accfb604ff30246114cd619181174 (patch)
tree111a09debe00255c2df2cd3d674841a7bfaf4029
parent4d40c984d15d1ae5f90fe3d23ea53670f2358b8e (diff)
downloadchromium_src-f5a3de8ad37accfb604ff30246114cd619181174.zip
chromium_src-f5a3de8ad37accfb604ff30246114cd619181174.tar.gz
chromium_src-f5a3de8ad37accfb604ff30246114cd619181174.tar.bz2
Revert of Remove the assertion that number of expected tabs must equal to number of live tabs temporarily. (patchset #1 of https://codereview.chromium.org/484353003/)
Reason for revert: The original patch of this (https://codereview.chromium.org/449753002/) broke chromeos bot in https://code.google.com/p/chromium/issues/detail?id=406010 Original issue's description: > Remove the assertion that number of expected tabs must equal to number of live tabs temporarily. > > BUG=405955 > NOTRY=true > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291368 TBR=tonyg@chromium.org,dtu@chromium.org NOTREECHECKS=true NOTRY=true BUG=405955 Review URL: https://codereview.chromium.org/495393002 Cr-Commit-Position: refs/heads/master@{#291424} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291424 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py12
1 files changed, 1 insertions, 11 deletions
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 80e852f..95854c3 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 @@ class TabListBackend(inspector_backend_list.InspectorBackendList):
'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)