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

Issue 10449094: Fix client-side phishing detection test flakiness and ChromeOS failure. (Closed)

Created:
8 years, 6 months ago by Brian Ryner
Modified:
8 years, 6 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jochen+watch-content_chromium.org, brettw-cc_chromium.org, Rick Byers
Visibility:
Public.

Description

Fix client-side phishing detection test flakiness and ChromeOS failure. The problem is that RenderViewFakeResourcesTest creates a RenderThreadImpl, but without setting up the sandbox environment, specifically the domain socket used on Linux. This caused the sandbox's pre-assigned file descriptor to be taken by other files or sockets, leading to a hang when the sandbox code tries to talk to the browser. To fix this, add a way for tests to disable the WebSandboxSupport implementation in RendererWebKitPlatformSupportImpl. The problem also affects WebRTCAudioDeviceTest, so fixed it there as well. BUG=128705 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=140631

Patch Set 1 #

Patch Set 2 : Generalize the fix and apply it to webrtc_audio_device_test #

Total comments: 4

Patch Set 3 : second try #

Patch Set 4 : Add a method on RWKPSI to disable sandbox support #

Patch Set 5 : Restore the previous sandbox-enabled state #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -15 lines) Patch
M chrome/renderer/safe_browsing/phishing_classifier_browsertest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc View 1 2 7 chunks +7 lines, -7 lines 0 comments Download
M chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M content/public/test/render_view_fake_resources_test.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.h View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.cc View 1 2 3 4 3 chunks +16 lines, -1 line 0 comments Download
M content/test/render_view_fake_resources_test.cc View 1 2 3 4 3 chunks +5 lines, -0 lines 0 comments Download
M content/test/webrtc_audio_device_test.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/test/webrtc_audio_device_test.cc View 1 2 3 4 3 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 19 (0 generated)
Brian Ryner
8 years, 6 months ago (2012-06-01 05:09:32 UTC) #1
jochen (gone - plz use gerrit)
drive-by content nits http://codereview.chromium.org/10449094/diff/9001/content/content_tests.gypi File content/content_tests.gypi (right): http://codereview.chromium.org/10449094/diff/9001/content/content_tests.gypi#newcode87 content/content_tests.gypi:87: 'test/render_test_utils.cc', I'd name this file test_renderer_thread.{cc,h} ...
8 years, 6 months ago (2012-06-01 12:11:37 UTC) #2
agl
Seems reasonable to me, but I have to defer to jam who actually knows something ...
8 years, 6 months ago (2012-06-01 12:52:14 UTC) #3
Brian Ryner
http://codereview.chromium.org/10449094/diff/9001/content/content_tests.gypi File content/content_tests.gypi (right): http://codereview.chromium.org/10449094/diff/9001/content/content_tests.gypi#newcode87 content/content_tests.gypi:87: 'test/render_test_utils.cc', On 2012/06/01 12:11:38, jochen wrote: > I'd name ...
8 years, 6 months ago (2012-06-01 18:06:34 UTC) #4
jam
http://codereview.chromium.org/10449094/diff/9001/content/test/render_test_utils.h File content/test/render_test_utils.h (right): http://codereview.chromium.org/10449094/diff/9001/content/test/render_test_utils.h#newcode15 content/test/render_test_utils.h:15: #include "content/renderer/renderer_webkitplatformsupport_impl.h" we don't allow headers in content/test to ...
8 years, 6 months ago (2012-06-01 22:11:24 UTC) #5
Brian Ryner
Hm, so render_view_test.h was already pulling in renderer_webkitplatformsupport_impl.h. The tests that I changed under chrome/ ...
8 years, 6 months ago (2012-06-01 23:06:07 UTC) #6
jam
On 2012/06/01 23:06:07, Brian Ryner wrote: > Hm, so render_view_test.h was already pulling in > ...
8 years, 6 months ago (2012-06-02 17:17:58 UTC) #7
Brian Ryner
So given that change you made, the factory function for the WebKitPlatformSupportImpl should go in ...
8 years, 6 months ago (2012-06-02 18:58:09 UTC) #8
jam
btw here's a change that does this: http://codereview.chromium.org/10497013/ On 2012/06/02 18:58:09, Brian Ryner wrote: > ...
8 years, 6 months ago (2012-06-03 23:31:14 UTC) #9
Brian Ryner
Please take another look. Thanks,
8 years, 6 months ago (2012-06-05 00:58:55 UTC) #10
jam
this is a _lot_ of plumbing. what about if you had a static function like ...
8 years, 6 months ago (2012-06-05 01:47:53 UTC) #11
Brian Ryner
Assuming everyone is good with this testing-specific method on RendererWebKitPlatformSupportImpl, I think what you're suggesting ...
8 years, 6 months ago (2012-06-05 02:32:03 UTC) #12
jam
On 2012/06/05 02:32:03, Brian Ryner wrote: > Assuming everyone is good with this testing-specific method ...
8 years, 6 months ago (2012-06-05 03:42:01 UTC) #13
Brian Ryner
Ok, changed to disable sandbox support with a static method. Please take another look.
8 years, 6 months ago (2012-06-05 05:42:40 UTC) #14
jam
this looks good, but I think you want to clean up after the test since ...
8 years, 6 months ago (2012-06-05 16:14:19 UTC) #15
Brian Ryner
Done, and updated the issue description for the new approach. Please take another look. Thanks, ...
8 years, 6 months ago (2012-06-05 17:56:48 UTC) #16
jam
lgtm
8 years, 6 months ago (2012-06-05 20:05:35 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bryner@chromium.org/10449094/38001
8 years, 6 months ago (2012-06-05 20:15:31 UTC) #18
commit-bot: I haz the power
8 years, 6 months ago (2012-06-05 22:01:05 UTC) #19
Change committed as 140631

Powered by Google App Engine
This is Rietveld 408576698