Chromium Code Reviews| Index: tracing/tracing/extras/chrome/estimated_input_latency_test.html |
| diff --git a/tracing/tracing/extras/chrome/estimated_input_latency_test.html b/tracing/tracing/extras/chrome/estimated_input_latency_test.html |
| index baaad307530d1820a8354b8558c5fb43471e8211..896751195d8ca18e4b0fed32352b6943e86d44fd 100644 |
| --- a/tracing/tracing/extras/chrome/estimated_input_latency_test.html |
| +++ b/tracing/tracing/extras/chrome/estimated_input_latency_test.html |
| @@ -302,11 +302,28 @@ tr.b.unittest.testSuite(function() { |
| ]), |
| 1e-6); |
| assert.throws(() => maxExpectedQueueingTimeInSlidingWindow(0, 10, 100, |
| - [{start: 0, end: 100}])); |
| + [{start: 0, end: 100}]), |
| + 'The sliding window must fit in the specified time range' |
| + ); |
| assert.throws(() => maxExpectedQueueingTimeInSlidingWindow(0, 10, 0, |
| - [{start: 0, end: 100}])); |
| + [{start: 0, end: 100}]), |
| + 'The window size must be positive number' |
| + ); |
| assert.throws(() => maxExpectedQueueingTimeInSlidingWindow(0, 100, 10, |
| - [{start: 0, end: 100}, {start: 99, end: 101}])); |
| + [{start: 0, end: 100}, {start: 99, end: 101}]), |
| + 'Tasks must not overlap' |
| + ); |
| + // Allow small floating-point precision error when comparing task |
| + // end-points for overlaping. |
| + assert.closeTo((100.0001 + 0.0001) / 2, |
|
charliea (OOO until 10-5)
2017/02/24 21:22:01
General comment: there are a bunch of different be
ulan
2017/02/24 21:28:11
Thank you. As discussed online, I'll refactor this
|
| + maxExpectedQueueingTimeInSlidingWindow(0, 1000, 100, |
| + [{start: 0, end: 100.0001}, {start: 100.0, end: 200}]), |
| + 1e-6); |
| + // Overlap larger than 1e-3 should trigger exception. |
| + assert.throws(() => maxExpectedQueueingTimeInSlidingWindow(0, 100, 10, |
| + [{start: 0, end: 100.0011}, {start: 100.0, end: 101}]), |
| + 'Tasks must not overlap' |
| + ); |
| }); |
| }); |
| </script> |