Commit f5a3de8a authored by nednguyen@google.com's avatar nednguyen@google.com

Revert of Remove the assertion that number of expected tabs must equal to...

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
parent 4d40c984
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment