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

Issue 10912070: Makes it possible to run content_browsertests with --as-browser and fake WebRTC devices. (Closed)

Created:
8 years, 3 months ago by phoglund_chromium
Modified:
8 years, 3 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Makes it possible to run content_browsertests with --as-browser and fake WebRTC devices. The first part of the patch makes it possible to launch content_browsertests with the --as-browser flag. This is essentially just merging the two Run methods for the content test runner and the chrome test runner. The second part hooks up the content tests to use fake WebRTC devices. I'm not really happy with the use of a global variable in browser_main_loop, but the tricky thing is that the call needs to happen precisely where it does happen, e.g. after the IO thread has been created but before we start pumping messages. It's hard to hook in precisely at that spot. In fact, it's hard to even hook in after the browser main loop has been created from our vantage point in the content browser tests. Hooking into ShellBrowserMainParts::PreMainMessageLoopRun would have worked great, but we can't do our UseFakeDevice call there directly since that's in the content shell code, which can't reach that method due to deps rules. We could override that method from the content browser tests though - we have control over the creation of the ShellMainDelegate. However, we would have to override our way through ShellContentBrowserClient to get to ShellBrowserMainParts, and I don't see a good way to do that given how the code is written currently. Calling down through these guys doesn't work either, since the content browser tests have already handed off control to the main content code when we need to make the call. Hence, this solution. BUG= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=155760

Patch Set 1 #

Total comments: 16

Patch Set 2 : Made this patch only contain the --as-browser changes (moving rtc stuff to a new patch) #

Patch Set 3 : Review updates for --as-browser patch #

Total comments: 8

Patch Set 4 : Nit fixes #

Total comments: 2

Patch Set 5 : Wrapped ChromeMainDelegate in a platform check since it doesn't link on mac. #

Patch Set 6 : Rebased again. #

Patch Set 7 : Removed accidently added files. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -70 lines) Patch
M chrome/test/base/chrome_test_launcher.cc View 1 2 3 4 2 chunks +12 lines, -30 lines 0 comments Download
M chrome/test/base/chrome_test_suite.h View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/test/base/chrome_test_suite.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/test/base/in_process_browser_test.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/public/test/test_launcher.h View 1 2 3 chunks +6 lines, -1 line 0 comments Download
M content/public/test/test_launcher.cc View 1 2 3 4 chunks +46 lines, -10 lines 0 comments Download
M content/test/content_test_launcher.cc View 1 2 3 4 5 3 chunks +5 lines, -23 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
jam
This looks good in general. Can you separate out the --as-browser patch from the fake ...
8 years, 3 months ago (2012-09-04 15:18:14 UTC) #1
phoglund_chromium
True, the patches did turn out to be completely independent, so I will move the ...
8 years, 3 months ago (2012-09-05 09:41:04 UTC) #2
phoglund_chromium
The new fake rtc patch is here: https://chromiumcodereview.appspot.com/10919095 http://codereview.chromium.org/10912070/diff/1/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): http://codereview.chromium.org/10912070/diff/1/content/browser/browser_main_loop.cc#newcode231 content/browser/browser_main_loop.cc:231: BrowserMainLoop::use_fake_media_stream_device_ ...
8 years, 3 months ago (2012-09-05 11:43:54 UTC) #3
jam
https://codereview.chromium.org/10912070/diff/8001/content/public/test/test_launcher.cc File content/public/test/test_launcher.cc (right): https://codereview.chromium.org/10912070/diff/8001/content/public/test/test_launcher.cc#newcode29 content/public/test/test_launcher.cc:29: #include "content/public/common/content_switches.h" nit: order https://codereview.chromium.org/10912070/diff/8001/content/public/test/test_launcher.cc#newcode649 content/public/test/test_launcher.cc:649: const char kLaunchAsBrowser[] ...
8 years, 3 months ago (2012-09-05 15:26:49 UTC) #4
phoglund_chromium
https://codereview.chromium.org/10912070/diff/8001/content/public/test/test_launcher.cc File content/public/test/test_launcher.cc (right): https://codereview.chromium.org/10912070/diff/8001/content/public/test/test_launcher.cc#newcode29 content/public/test/test_launcher.cc:29: #include "content/public/common/content_switches.h" On 2012/09/05 15:26:51, John Abd-El-Malek wrote: > ...
8 years, 3 months ago (2012-09-06 08:45:28 UTC) #5
tommi (sloooow) - chröme
lgtm http://codereview.chromium.org/10912070/diff/7003/content/public/test/test_launcher.cc File content/public/test/test_launcher.cc (right): http://codereview.chromium.org/10912070/diff/7003/content/public/test/test_launcher.cc#newcode630 content/public/test/test_launcher.cc:630: const char kChildProcessFlag[] = "child"; only one space ...
8 years, 3 months ago (2012-09-06 09:57:29 UTC) #6
jam
lgtm
8 years, 3 months ago (2012-09-06 16:24:02 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/phoglund@chromium.org/10912070/7003
8 years, 3 months ago (2012-09-07 08:10:25 UTC) #8
commit-bot: I haz the power
Try job failure for 10912070-7003 (retry) on mac_rel for step "compile" (clobber build). It's a ...
8 years, 3 months ago (2012-09-07 09:10:25 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/phoglund@chromium.org/10912070/7003
8 years, 3 months ago (2012-09-09 09:24:25 UTC) #10
commit-bot: I haz the power
Try job failure for 10912070-7003 (retry) on mac for step "compile" (clobber build). It's a ...
8 years, 3 months ago (2012-09-09 10:10:58 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/phoglund@chromium.org/10912070/5013
8 years, 3 months ago (2012-09-09 10:50:11 UTC) #12
commit-bot: I haz the power
Failed to apply patch for content/test/content_test_launcher.cc: While running patch -p1 --forward --force; patching file content/test/content_test_launcher.cc ...
8 years, 3 months ago (2012-09-09 13:36:35 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/phoglund@chromium.org/10912070/11003
8 years, 3 months ago (2012-09-10 12:21:05 UTC) #14
commit-bot: I haz the power
Try job failure for 10912070-11003 (retry) on linux_rel for step "interactive_ui_tests". It's a second try, ...
8 years, 3 months ago (2012-09-10 14:19:35 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/phoglund@chromium.org/10912070/11003
8 years, 3 months ago (2012-09-10 15:35:51 UTC) #16
commit-bot: I haz the power
8 years, 3 months ago (2012-09-10 17:51:53 UTC) #17
Change committed as 155760

Powered by Google App Engine
This is Rietveld 408576698