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

Issue 2524553002: [Extensions] Create ChromeTestExtensionLoader (Closed)

Created:
4 years ago by Devlin
Modified:
4 years ago
Reviewers:
lazyboy
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] Create ChromeTestExtensionLoader Create a ChromeTestExtensionLoader to load extensions during tests. This class is designed to be used across browser tests and unit tests, making it a (mostly) solution to needing to re-code the same implementation in various different test classes, as well as an alternative to the double-inheritance we sometimes see in order to get extension-loading helper methods in addition to some other test infrastructure. The main class includes options to modify the behavior according to most common flags set by existing (unit|browser) tests, such as error handling, packing, creation flags, permissions, etc. Additionally, hook the class up to the existing ExtensionBrowserTest (browser test) and ExtensionServiceTestWithInstall (unit test) as a proof of concept that it works in both unit and browser tests. Going forward, we should continue to a) expand the test loader and b) replace current duplicative code. BUG=667587 Committed: https://crrev.com/11f01686d8b1d4eb46f2bf6a76fecc012b518050 Cr-Commit-Position: refs/heads/master@{#434692}

Patch Set 1 : . #

Total comments: 14

Patch Set 2 : lazyboy's #

Patch Set 3 : compile #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+426 lines, -126 lines) Patch
M chrome/browser/BUILD.gn View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/chrome_extension_test_notification_observer.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/chrome_extension_test_notification_observer.cc View 2 chunks +5 lines, -0 lines 0 comments Download
A chrome/browser/extensions/chrome_test_extension_loader.h View 1 1 chunk +163 lines, -0 lines 0 comments Download
A chrome/browser/extensions/chrome_test_extension_loader.cc View 1 2 1 chunk +224 lines, -0 lines 3 comments Download
M chrome/browser/extensions/extension_browsertest.cc View 1 2 chunks +14 lines, -108 lines 0 comments Download
M chrome/browser/extensions/extension_service_test_with_install.cc View 2 chunks +14 lines, -16 lines 0 comments Download
M chrome/test/BUILD.gn View 1 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 60 (47 generated)
Devlin
lazyboy@, mind taking a look? There's more that can use this, but I wanted to ...
4 years ago (2016-11-23 05:11:50 UTC) #32
lazyboy
https://codereview.chromium.org/2524553002/diff/100001/chrome/browser/extensions/chrome_test_extension_loader.cc File chrome/browser/extensions/chrome_test_extension_loader.cc (right): https://codereview.chromium.org/2524553002/diff/100001/chrome/browser/extensions/chrome_test_extension_loader.cc#newcode68 chrome/browser/extensions/chrome_test_extension_loader.cc:68: extension_service_->ReloadExtension(extension_id_); Add a note on why reload is necessary. ...
4 years ago (2016-11-23 21:27:57 UTC) #33
Devlin
https://codereview.chromium.org/2524553002/diff/100001/chrome/browser/extensions/chrome_test_extension_loader.cc File chrome/browser/extensions/chrome_test_extension_loader.cc (right): https://codereview.chromium.org/2524553002/diff/100001/chrome/browser/extensions/chrome_test_extension_loader.cc#newcode68 chrome/browser/extensions/chrome_test_extension_loader.cc:68: extension_service_->ReloadExtension(extension_id_); On 2016/11/23 21:27:56, lazyboy wrote: > Add a ...
4 years ago (2016-11-23 22:19:07 UTC) #34
lazyboy
Sorry, one more q, didn't notice this before. https://codereview.chromium.org/2524553002/diff/140001/chrome/browser/extensions/chrome_test_extension_loader.cc File chrome/browser/extensions/chrome_test_extension_loader.cc (right): https://codereview.chromium.org/2524553002/diff/140001/chrome/browser/extensions/chrome_test_extension_loader.cc#newcode71 chrome/browser/extensions/chrome_test_extension_loader.cc:71: registry_observer.WaitForExtensionLoaded(); ...
4 years ago (2016-11-24 00:30:22 UTC) #41
Devlin
https://codereview.chromium.org/2524553002/diff/140001/chrome/browser/extensions/chrome_test_extension_loader.cc File chrome/browser/extensions/chrome_test_extension_loader.cc (right): https://codereview.chromium.org/2524553002/diff/140001/chrome/browser/extensions/chrome_test_extension_loader.cc#newcode71 chrome/browser/extensions/chrome_test_extension_loader.cc:71: registry_observer.WaitForExtensionLoaded(); On 2016/11/24 00:30:22, lazyboy wrote: > Here and ...
4 years ago (2016-11-24 00:35:30 UTC) #42
lazyboy
lgtm https://codereview.chromium.org/2524553002/diff/140001/chrome/browser/extensions/chrome_test_extension_loader.cc File chrome/browser/extensions/chrome_test_extension_loader.cc (right): https://codereview.chromium.org/2524553002/diff/140001/chrome/browser/extensions/chrome_test_extension_loader.cc#newcode71 chrome/browser/extensions/chrome_test_extension_loader.cc:71: registry_observer.WaitForExtensionLoaded(); On 2016/11/24 00:35:30, Devlin wrote: > On ...
4 years ago (2016-11-24 00:57:48 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2524553002/140001
4 years ago (2016-11-24 01:53:58 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
4 years ago (2016-11-24 03:55:44 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2524553002/140001
4 years ago (2016-11-24 06:26:50 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
4 years ago (2016-11-24 08:27:59 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2524553002/140001
4 years ago (2016-11-28 17:07:28 UTC) #55
commit-bot: I haz the power
Committed patchset #3 (id:140001)
4 years ago (2016-11-28 18:16:22 UTC) #58
commit-bot: I haz the power
4 years ago (2016-11-28 18:18:11 UTC) #60
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/11f01686d8b1d4eb46f2bf6a76fecc012b518050
Cr-Commit-Position: refs/heads/master@{#434692}

Powered by Google App Engine
This is Rietveld 408576698