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

Issue 13533007: Test extension reloading behavior. (Closed)

Created:
7 years, 8 months ago by Jeffrey Yasskin
Modified:
7 years, 8 months ago
CC:
chromium-reviews, creis+watch_chromium.org, jam, joi+watch-content_chromium.org, Aaron Boodman, darin-cc_chromium.org, ajwong+watch_chromium.org, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Test extension reloading behavior. By testing the actual interaction with renderer processes and the notification system, I can expose the fact that we're starting a whole extra process and loading the extension around 3 times. BUG=178542 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193974

Patch Set 1 #

Total comments: 33

Patch Set 2 : Fix Pawel's and Matt's comments #

Total comments: 3

Patch Set 3 : Add ForTesting to SetRenderProcessHostFactory #

Total comments: 11

Patch Set 4 : Fix Pawel's review comments #

Patch Set 5 : Filter IPC messages to extension messages #

Patch Set 6 : Define a local_state (PrefService) so tests don't crash when it's null #

Total comments: 3

Patch Set 7 : Fix Aura tests by using RenderViewHostTestEnabler and splitting out the IO thread #

Total comments: 2

Patch Set 8 : Fix the rest of the tests #

Patch Set 9 : Sync #

Total comments: 1

Patch Set 10 : Put back the ScopedTestingLocalState #

Patch Set 11 : Add a ScopedOleInitializer for Windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+283 lines, -23 lines) Patch
M chrome/browser/extensions/extension_service_unittest.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +13 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 17 chunks +198 lines, -17 lines 0 comments Download
M chrome/browser/extensions/user_script_listener_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/managed_mode/managed_user_service_unittest.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M content/public/test/mock_render_process_host.h View 1 1 chunk +19 lines, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 2 chunks +14 lines, -0 lines 0 comments Download
M content/public/test/test_notification_tracker.h View 1 2 3 2 chunks +17 lines, -0 lines 0 comments Download
M content/public/test/test_notification_tracker.cc View 1 2 chunks +12 lines, -0 lines 0 comments Download
M content/public/test/test_renderer_host.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M ipc/ipc_test_sink.h View 3 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
Jeffrey Yasskin
I'd like to spread this sort of testing out across more of the ExtensionService tests, ...
7 years, 8 months ago (2013-04-04 09:34:35 UTC) #1
Matt Perry
This looks like a good thing to test. I don't think we should add it ...
7 years, 8 months ago (2013-04-04 20:54:26 UTC) #2
Paweł Hajdan Jr.
https://codereview.chromium.org/13533007/diff/1/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/13533007/diff/1/chrome/browser/chrome_content_browser_client.cc#newcode902 chrome/browser/chrome_content_browser_client.cc:902: // Tests may not set up a profile manager. ...
7 years, 8 months ago (2013-04-04 21:30:05 UTC) #3
Jeffrey Yasskin
On 2013/04/04 20:54:26, Matt Perry wrote: > This looks like a good thing to test. ...
7 years, 8 months ago (2013-04-05 13:14:01 UTC) #4
Matt Perry
lgtm
7 years, 8 months ago (2013-04-05 20:39:38 UTC) #5
jam
https://codereview.chromium.org/13533007/diff/2002/content/public/test/test_notification_tracker.h File content/public/test/test_notification_tracker.h (right): https://codereview.chromium.org/13533007/diff/2002/content/public/test/test_notification_tracker.h#newcode68 content/public/test/test_notification_tracker.h:68: std::vector<int> GetTypes() const; hmm, we shouldn't be adding more ...
7 years, 8 months ago (2013-04-07 21:29:18 UTC) #6
Jeffrey Yasskin
On Apr 7, 2013 11:29 PM, <jam@chromium.org> wrote: > > > https://codereview.chromium.org/13533007/diff/2002/content/public/test/test_notification_tracker.h > File content/public/test/test_notification_tracker.h ...
7 years, 8 months ago (2013-04-07 23:46:29 UTC) #7
jam
On 2013/04/07 23:46:29, Jeffrey Yasskin wrote: > On Apr 7, 2013 11:29 PM, <mailto:jam@chromium.org> wrote: ...
7 years, 8 months ago (2013-04-08 15:49:06 UTC) #8
Jeffrey Yasskin
Thanks for taking a look. https://codereview.chromium.org/13533007/diff/2002/content/public/browser/site_instance.h File content/public/browser/site_instance.h (right): https://codereview.chromium.org/13533007/diff/2002/content/public/browser/site_instance.h#newcode115 content/public/browser/site_instance.h:115: virtual void SetRenderProcessHostFactory( On ...
7 years, 8 months ago (2013-04-08 16:30:48 UTC) #9
jam
btw looks fine to me, i'll wait for pawel's lgtm https://codereview.chromium.org/13533007/diff/26001/content/browser/site_instance_impl.cc File content/browser/site_instance_impl.cc (right): https://codereview.chromium.org/13533007/diff/26001/content/browser/site_instance_impl.cc#newcode196 ...
7 years, 8 months ago (2013-04-08 16:54:53 UTC) #10
Paweł Hajdan Jr.
https://codereview.chromium.org/13533007/diff/1/content/public/test/test_notification_tracker.h File content/public/test/test_notification_tracker.h (right): https://codereview.chromium.org/13533007/diff/1/content/public/test/test_notification_tracker.h#newcode48 content/public/test/test_notification_tracker.h:48: // Given notifications type(sp, returns true if the list ...
7 years, 8 months ago (2013-04-08 20:03:50 UTC) #11
Jeffrey Yasskin
https://codereview.chromium.org/13533007/diff/1/content/public/test/test_notification_tracker.h File content/public/test/test_notification_tracker.h (right): https://codereview.chromium.org/13533007/diff/1/content/public/test/test_notification_tracker.h#newcode48 content/public/test/test_notification_tracker.h:48: // Given notifications type(sp, returns true if the list ...
7 years, 8 months ago (2013-04-08 22:09:38 UTC) #12
Paweł Hajdan Jr.
https://codereview.chromium.org/13533007/diff/26001/chrome/browser/extensions/extension_process_manager.h File chrome/browser/extensions/extension_process_manager.h (right): https://codereview.chromium.org/13533007/diff/26001/chrome/browser/extensions/extension_process_manager.h#newcode144 chrome/browser/extensions/extension_process_manager.h:144: content::SiteInstance* GetSiteInstanceForTest() { On 2013/04/08 22:09:38, Jeffrey Yasskin wrote: ...
7 years, 8 months ago (2013-04-08 22:17:37 UTC) #13
Jeffrey Yasskin
I have some tests to investigate and fix, but that'll have to wait for morning ...
7 years, 8 months ago (2013-04-08 22:38:02 UTC) #14
Jeffrey Yasskin
Here's another attempt. The reload test should work on all platforms now, but the change ...
7 years, 8 months ago (2013-04-09 17:58:32 UTC) #15
Matt Perry
lgtm https://codereview.chromium.org/13533007/diff/40003/chrome/browser/extensions/extension_service_unittest.cc File chrome/browser/extensions/extension_service_unittest.cc (right): https://codereview.chromium.org/13533007/diff/40003/chrome/browser/extensions/extension_service_unittest.cc#newcode3709 chrome/browser/extensions/extension_service_unittest.cc:3709: ExtensionMsg_Loaded::ID, On 2013/04/09 17:58:32, Jeffrey Yasskin wrote: > ...
7 years, 8 months ago (2013-04-09 20:20:03 UTC) #16
Paweł Hajdan Jr.
LGTM
7 years, 8 months ago (2013-04-09 20:41:08 UTC) #17
Jeffrey Yasskin
https://codereview.chromium.org/13533007/diff/40003/chrome/browser/extensions/extension_service_unittest.cc File chrome/browser/extensions/extension_service_unittest.cc (right): https://codereview.chromium.org/13533007/diff/40003/chrome/browser/extensions/extension_service_unittest.cc#newcode3709 chrome/browser/extensions/extension_service_unittest.cc:3709: ExtensionMsg_Loaded::ID, On 2013/04/09 20:20:03, Matt Perry wrote: > On ...
7 years, 8 months ago (2013-04-10 16:18:57 UTC) #18
Jeffrey Yasskin
I think I still need jam's lgtm for ipc/. Rietveld thinks I have it, but ...
7 years, 8 months ago (2013-04-11 17:44:15 UTC) #19
jam
lgtm
7 years, 8 months ago (2013-04-12 16:50:32 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/13533007/79011
7 years, 8 months ago (2013-04-12 16:53:17 UTC) #21
commit-bot: I haz the power
Change committed as 193974
7 years, 8 months ago (2013-04-12 18:54:00 UTC) #22
Reid Kleckner
7 years, 8 months ago (2013-04-12 21:25:22 UTC) #23
Message was sent while issue was closed.
This appears to have created a whole bundle of races in another test using
ExtensionServiceTestBase and the io thread:
http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28t...

The io thread appears to running freely and accessing the std::map while the
main thread is tearing down the test.

Powered by Google App Engine
This is Rietveld 408576698