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

Issue 151003003: Fix navigation to unittest files (Closed)

Created:
6 years, 10 months ago by achuithb
Modified:
6 years, 10 months ago
Reviewers:
dtu, tonyg
CC:
chromium-reviews, chrome-speed-team+watch_google.com, telemetry+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Fix navigation to unittest files. We have a number of instances where unit tests call UrlOf('blank.html') or something similar. The _base_dir is src/tools/telemetry/unittest_data, so the output of relpath is something like ../blank.html. This works because the http server just ignores the ../ and serves up http://localhost/blank.html. In the case of cros autotests, the output of relpath ends up being something like ../../../../../../autotest/, and this doesn't work. When running unit tests via autotest, cwd and the unittest_data directory have no common parent. If they did, the buggy code would continue to work. This patch introduces navigate_to_test.NavigateToTestFile, which takes a filename relative to the unittest data directory, converts it to an absolute path, sets up an http server pointing to the unittest data directory, and navigates the tab to the file as requested. tab_test_case.Navigate is a wrapper used by the majority of these unit tests. Enable all previously failing cros unittests as well. BUG=337582 TEST=manual Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=252253

Patch Set 1 #

Patch Set 2 : dtu feedback #

Patch Set 3 : revert changes in memory_cache_http_unittest.py #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -100 lines) Patch
M tools/telemetry/telemetry/core/backends/chrome/inspector_console_unittest.py View 1 1 chunk +1 line, -7 lines 0 comments Download
M tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py View 1 1 chunk +4 lines, -11 lines 0 comments Download
M tools/telemetry/telemetry/core/backends/chrome/inspector_page_unittest.py View 1 3 chunks +5 lines, -15 lines 0 comments Download
M tools/telemetry/telemetry/core/tab_unittest.py View 1 2 chunks +1 line, -6 lines 0 comments Download
M tools/telemetry/telemetry/page/actions/click_element_unittest.py View 1 4 chunks +4 lines, -22 lines 0 comments Download
M tools/telemetry/telemetry/page/actions/loop_unittest.py View 1 4 chunks +1 line, -7 lines 0 comments Download
M tools/telemetry/telemetry/page/actions/navigate_unittest.py View 1 1 chunk +2 lines, -7 lines 0 comments Download
M tools/telemetry/telemetry/page/actions/play_unittest.py View 1 8 chunks +1 line, -11 lines 0 comments Download
M tools/telemetry/telemetry/page/actions/seek_unittest.py View 1 5 chunks +1 line, -8 lines 0 comments Download
M tools/telemetry/telemetry/page/actions/wait_unittest.py View 1 1 chunk +1 line, -6 lines 0 comments Download
A tools/telemetry/telemetry/unittest/navigate_test.py View 1 1 chunk +20 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/unittest/tab_test_case.py View 1 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
achuithb
Let me know what you think, Dave.
6 years, 10 months ago (2014-01-31 01:13:14 UTC) #1
dtu
On 2014/01/31 01:13:14, achuith.bhandarkar wrote: > Let me know what you think, Dave. Hrm, this ...
6 years, 10 months ago (2014-02-03 21:27:31 UTC) #2
achuithb
On 2014/02/03 21:27:31, dtu wrote: > On 2014/01/31 01:13:14, achuith.bhandarkar wrote: > > Let me ...
6 years, 10 months ago (2014-02-03 21:39:31 UTC) #3
dtu
On 2014/02/03 21:39:31, achuith.bhandarkar wrote: > On 2014/02/03 21:27:31, dtu wrote: > > On 2014/01/31 ...
6 years, 10 months ago (2014-02-03 21:42:52 UTC) #4
achuithb
Dave, I've done this the 'right' way - there's no special magic in UrlOf any ...
6 years, 10 months ago (2014-02-18 22:29:58 UTC) #5
tonyg
lgtm Love to see these tests getting re-enabled. Here's to a more stable Telemetry on ...
6 years, 10 months ago (2014-02-19 16:30:12 UTC) #6
dtu
lgtm
6 years, 10 months ago (2014-02-19 19:30:31 UTC) #7
achuithb
On 2014/02/19 19:30:31, dtu wrote: > lgtm Thank you!
6 years, 10 months ago (2014-02-19 19:55:27 UTC) #8
achuithb
The CQ bit was checked by achuith@chromium.org
6 years, 10 months ago (2014-02-19 19:55:42 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/achuith@chromium.org/151003003/80001
6 years, 10 months ago (2014-02-19 19:56:18 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-19 22:47:51 UTC) #11
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) telemetry_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=228685
6 years, 10 months ago (2014-02-19 22:47:51 UTC) #12
achuithb
The CQ bit was checked by achuith@chromium.org
6 years, 10 months ago (2014-02-20 01:32:36 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/achuith@chromium.org/151003003/400001
6 years, 10 months ago (2014-02-20 01:41:41 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/achuith@chromium.org/151003003/400001
6 years, 10 months ago (2014-02-20 05:11:40 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/achuith@chromium.org/151003003/400001
6 years, 10 months ago (2014-02-20 09:07:22 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/achuith@chromium.org/151003003/400001
6 years, 10 months ago (2014-02-20 12:29:06 UTC) #17
commit-bot: I haz the power
6 years, 10 months ago (2014-02-20 16:03:49 UTC) #18
Message was sent while issue was closed.
Change committed as 252253

Powered by Google App Engine
This is Rietveld 408576698