| OLD | NEW |
| (Empty) | |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 import unittest |
| 5 |
| 6 import multi_page_benchmark |
| 7 |
| 8 class BenchThatFails(multi_page_benchmark.MultiPageBenchmark): |
| 9 def MeasurePage(self, page, tab): |
| 10 raise multi_page_benchmark.MeasurementFailure("Whoops") |
| 11 |
| 12 class MultiPageBenchmarkTest(multi_page_benchmark.MultiPageBenchmarkUnitTest): |
| 13 def testFailure(self): |
| 14 ps = self.CreatePageSetFromFileInUnittestDataDir('non_scrollable_page.html') |
| 15 benchmark = BenchThatFails() |
| 16 rows = self.RunBenchmark(benchmark, ps) |
| 17 self.assertEquals(1, len(benchmark.page_failures)) |
| OLD | NEW |