[telemetry] Create BrowserTestCase to reuse the browser for browser_unittest.
commitc2d97ec1e3e1d10fcfdacce301d1014adda7316b
authordtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 13 Aug 2014 10:06:49 +0000 (13 10:06 +0000)
committerdtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 13 Aug 2014 10:08:41 +0000 (13 10:08 +0000)
tree6ddef56742168fca0a066382925579d4d5622f57
parent6d544b2cdc314ccdb91d81ba9e74276836450307
[telemetry] Create BrowserTestCase to reuse the browser for browser_unittest.

This brings browser_unittest's run time from 21s to 7s on a Z620 Linux, one of our fastest
configurations. (We still need 3 browser launches to test browser options and profile loading.)

Add BrowserTestCase as the new parent class of TabTestCase. The separation is very clean :)
Also add helper method UrlOfUnittestFile - many tests are using http_server.UrlOf incorrectly,
and this helper ensures the HTTP server is running and we're pointing to the right file.
Also move page_test_test_case from testing/ to unittest/ and remove testing/.

BUG=388256
TEST=tools/telemetry/run_tests

Review URL: https://codereview.chromium.org/469593002

Cr-Commit-Position: refs/heads/master@{#289247}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289247 0039d316-1c4b-4281-b951-d872f2087c98
21 files changed:
tools/perf/measurements/loading_trace_unittest.py
tools/perf/measurements/rasterize_and_record_micro_unittest.py
tools/perf/measurements/record_per_area_unittest.py
tools/perf/measurements/repaint_unittest.py
tools/perf/measurements/screenshot_unittest.py
tools/perf/measurements/skpicture_printer_unittest.py
tools/perf/measurements/smoothness_unittest.py
tools/perf/measurements/thread_times_unittest.py
tools/telemetry/telemetry/core/backends/chrome/tracing_backend_unittest.py
tools/telemetry/telemetry/core/browser_unittest.py
tools/telemetry/telemetry/core/memory_cache_http_server_unittest.py
tools/telemetry/telemetry/core/tab_unittest.py
tools/telemetry/telemetry/page/actions/navigate_unittest.py
tools/telemetry/telemetry/page/actions/scroll_unittest.py
tools/telemetry/telemetry/page/page_test_unittest.py
tools/telemetry/telemetry/page/record_wpr_unittest.py
tools/telemetry/telemetry/testing/__init__.py [deleted file]
tools/telemetry/telemetry/unittest/browser_test_case.py [new file with mode: 0644]
tools/telemetry/telemetry/unittest/page_test_test_case.py [moved from tools/telemetry/telemetry/testing/page_test_test_case.py with 100% similarity]
tools/telemetry/telemetry/unittest/tab_test_case.py
tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py