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

Unified Diff: trunk/src/tools/telemetry/telemetry/results/gtest_test_results_unittest.py

Issue 393713005: Revert 284459 "Add FailureValue and wire it through PageTestResu..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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
Index: trunk/src/tools/telemetry/telemetry/results/gtest_test_results_unittest.py
===================================================================
--- trunk/src/tools/telemetry/telemetry/results/gtest_test_results_unittest.py (revision 284496)
+++ trunk/src/tools/telemetry/telemetry/results/gtest_test_results_unittest.py (working copy)
@@ -8,7 +8,6 @@
from telemetry.results import base_test_results_unittest
from telemetry.results import gtest_test_results
from telemetry.unittest import simple_mock
-from telemetry.value import failure
def _MakePageSet():
@@ -57,10 +56,10 @@
results = SummaryGtestTestResults()
results.StartTest(test_page_set.pages[0])
- exc_info = self.CreateException()
- results.AddValue(failure.FailureValue(test_page_set.pages[0], exc_info))
+ exception = self.CreateException()
+ results.AddFailure(test_page_set.pages[0], exception)
results.PrintSummary()
- exception_trace = ''.join(traceback.format_exception(*exc_info))
+ exception_trace = ''.join(traceback.format_exception(*exception))
expected = ('[ RUN ] http://www.foo.com/\n'
'%s\n'
'[ FAILED ] http://www.foo.com/ (0 ms)\n'
@@ -85,7 +84,7 @@
def testPassAndFailedPages(self):
test_page_set = _MakePageSet()
results = SummaryGtestTestResults()
- exc_info = self.CreateException()
+ exception = self.CreateException()
results.StartTest(test_page_set.pages[0])
self._mock_timer.SetTime(0.007)
@@ -93,18 +92,18 @@
results.StartTest(test_page_set.pages[1])
self._mock_timer.SetTime(0.009)
- results.AddValue(failure.FailureValue(test_page_set.pages[1], exc_info))
+ results.AddFailure(test_page_set.pages[1], exception)
results.StartTest(test_page_set.pages[2])
self._mock_timer.SetTime(0.015)
- results.AddValue(failure.FailureValue(test_page_set.pages[2], exc_info))
+ results.AddFailure(test_page_set.pages[2], exception)
results.StartTest(test_page_set.pages[3])
self._mock_timer.SetTime(0.020)
results.AddSuccess(test_page_set.pages[3])
results.PrintSummary()
- exception_trace = ''.join(traceback.format_exception(*exc_info))
+ exception_trace = ''.join(traceback.format_exception(*exception))
expected = ('[ RUN ] http://www.foo.com/\n'
'[ OK ] http://www.foo.com/ (7 ms)\n'
'[ RUN ] http://www.bar.com/\n'
@@ -125,7 +124,7 @@
def testStreamingResults(self):
test_page_set = _MakePageSet()
results = SummaryGtestTestResults()
- exc_info = self.CreateException()
+ exception = self.CreateException()
results.StartTest(test_page_set.pages[0])
self._mock_timer.SetTime(0.007)
@@ -136,8 +135,8 @@
results.StartTest(test_page_set.pages[1])
self._mock_timer.SetTime(0.009)
- exception_trace = ''.join(traceback.format_exception(*exc_info))
- results.AddValue(failure.FailureValue(test_page_set.pages[1], exc_info))
+ exception_trace = ''.join(traceback.format_exception(*exception))
+ results.AddFailure(test_page_set.pages[1], exception)
expected = ('[ RUN ] http://www.foo.com/\n'
'[ OK ] http://www.foo.com/ (7 ms)\n'
'[ RUN ] http://www.bar.com/\n'

Powered by Google App Engine
This is Rietveld 408576698