summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_function_test_utils.h
Commit message (Collapse)AuthorAgeFilesLines
* Move chrome.alarms API from chrome/ to extensions/.sudarsana.nagineni2015-01-311-5/+0
| | | | | | | | | | | | | | | | | | | This CL allows app_shell to use chrome.alarms. Also it includes the following changes related to unit tests: - Moved chrome.alarms tests to extensions/ - Moved a helper function CreateEmptyExtensionWithLocation() from extension_function_test_utils.h to api_test_utils.h. - Moved CreateBackgroundPage() from extension_api_unittest.h to api_unittest.h. - Creates WebContents for the extension that can be used to associate a RenderViewHost in extension unit tests. BUG=443622 Review URL: https://codereview.chromium.org/789643004 Cr-Commit-Position: refs/heads/master@{#314040}
* Removed duplicated code in extension_function_test_utilsthiago.santos2015-01-051-18/+0
| | | | | | | | | | Removed few functions from extension_function_test_utils that were already being forwarded to api_test_utils and updated the tests using them. Review URL: https://codereview.chromium.org/825723002 Cr-Commit-Position: refs/heads/master@{#309951}
* Set the favicon URL in the tabs returned from chrome.sessions.getDevices.kalman2014-10-231-3/+3
| | | | | | | | | BUG=422140 R=zea@chromium.org Review URL: https://codereview.chromium.org/671063002 Cr-Commit-Position: refs/heads/master@{#300942}
* Remove CreateEmptyExtension from extension_function_test_utilslimasdf2014-09-181-13/+0
| | | | | | | | | | because "extensions/common/test_util.h" has duplicate function. BUG=394840 Review URL: https://codereview.chromium.org/569493003 Cr-Commit-Position: refs/heads/master@{#295541}
* Rework ExtensionApiUnittest to run in extensions_unittests, removing its ↵yoz2014-08-281-0/+2
| | | | | | | | | | | | Chrome dependencies. Move SocketsTcpUnitTest as the first test to use it. BUG=397164 Review URL: https://codereview.chromium.org/461273003 Cr-Commit-Position: refs/heads/master@{#292296}
* Adding support for args as ListValues in extension_function_test_utils.ckehoe@chromium.org2014-08-161-0/+6
| | | | | | | Review URL: https://codereview.chromium.org/473363003 Cr-Commit-Position: refs/heads/master@{#290130} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290130 0039d316-1c4b-4281-b951-d872f2087c98
* Drive extension functions from ExtensionFunction::Run. Thekalman@chromium.org2014-05-031-1/+0
| | | | | | | | | | | | | | | SyncExtensionFunction and AsyncExtensionFunction derivates now expose RunSync and RunAsync respectively. New extension function implementations should just implement Run directly. BUG=365732 R=rockot@chromium.org TBR=dmazzoni@chromium.org Review URL: https://codereview.chromium.org/257333002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268033 0039d316-1c4b-4281-b951-d872f2087c98
* Disable Background Menu Items for Component Extensions without Options Pagesrobliao@chromium.org2013-11-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | Component extensions with background that do not have an options page will cause this menu item to go to the extensions page with an absent component extension. Ideally, we would remove this item, but this conflicts with the user model where this menu shows the extensions with background. The compromise is to disable the item, avoiding the non-actionable navigate to the extensions page and preserving the user model. BUG=311884 TEST=From the Chrome Background Context Menu, "Google Now" should be disabled. Other extensions (non-component or has options page) will remain enabled. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=232602 R=kalman@chromium.org, miket@chromium.org, sky@chromium.org, vadimt@chromium.org Review URL: https://codereview.chromium.org/52553004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232728 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 232602 "Disable Background Menu Items for Component Exten..."bbudge@chromium.org2013-11-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broke Linux valgrind bot http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28valgrind%29%285%29/builds/24031 > Disable Background Menu Items for Component Extensions without Options Pages > > Component extensions with background that do not have an options page > will cause this menu item to go to the extensions page with an > absent component extension. > > Ideally, we would remove this item, but this conflicts with the user > model where this menu shows the extensions with background. > > The compromise is to disable the item, avoiding the non-actionable > navigate to the extensions page and preserving the user model. > > BUG=311884 > TEST=From the Chrome Background Context Menu, "Google Now" should be disabled. > Other extensions (non-component or has options page) will remain enabled. > > Review URL: https://codereview.chromium.org/52553004 TBR=robliao@chromium.org Review URL: https://codereview.chromium.org/56943002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232619 0039d316-1c4b-4281-b951-d872f2087c98
* Disable Background Menu Items for Component Extensions without Options Pagesrobliao@chromium.org2013-11-021-4/+0
| | | | | | | | | | | | | | | | | | | | Component extensions with background that do not have an options page will cause this menu item to go to the extensions page with an absent component extension. Ideally, we would remove this item, but this conflicts with the user model where this menu shows the extensions with background. The compromise is to disable the item, avoiding the non-actionable navigate to the extensions page and preserving the user model. BUG=311884 TEST=From the Chrome Background Context Menu, "Google Now" should be disabled. Other extensions (non-component or has options page) will remain enabled. Review URL: https://codereview.chromium.org/52553004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232602 0039d316-1c4b-4281-b951-d872f2087c98
* Move Feature and Manifest to top-level extensions.yoz@chromium.org2013-08-221-1/+1
| | | | | | | | BUG=162530 Review URL: https://chromiumcodereview.appspot.com/23257005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219075 0039d316-1c4b-4281-b951-d872f2087c98
* Make power API available to platform apps.derat@chromium.org2013-03-211-4/+5
| | | | | | | | | | I'm also fixing memory leaks in PowerApiTest. BUG=178944 Review URL: https://codereview.chromium.org/12741009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189523 0039d316-1c4b-4281-b951-d872f2087c98
* Move Extension Location and Type enums to Manifest, and move InstallWarning ↵yoz@chromium.org2013-01-311-4/+4
| | | | | | | | | | | | | | | to its own file. Reverses the dependency between Extension and Manifest. Part 1 of moving Manifest to top-level extensions. BUG=162530 TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/12093036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179828 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure that a given app/extension requests only its own resources.miket@chromium.org2012-09-111-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | All ApiResources of a given type live in a single pool. Until now, one app could send arbitrary resource IDs in and get another app's resources if it were lucky. Now we check that an app is getting back only its own resources. Note that this CL could have been shorter if I hadn't decided to break out the owner_extension_id in ApiResource's constructor. I decided to do this anyway because the other way to get that information (asking ApiResourceEventNotifier) violated the Law of Demeter, or even if it was a technical non-violation, I didn't feel good about relying on the incidental fact that AREN knew the extension ID. Ben for OWNERS TBR=ben@chromium.org BUG=142521 TEST=added Review URL: https://chromiumcodereview.appspot.com/10919201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156149 0039d316-1c4b-4281-b951-d872f2087c98
* Tabs Extension: Implementation of tabs.duplicate api.ncj674@motorola.com2012-09-101-0/+13
| | | | | | | | | | | BUG=36007 TEST=Manual: Tested with an extension with/without "tabs" permission. Automated: unittest: ExtensionTabsTest.DuplicateTabNoPermission, ExtensionPermissionsTest.DefaultFunctionAccess, ExtensionTest.ApiPermissions apitest: ExtensionApiTest.TabDuplicate Review URL: https://chromiumcodereview.appspot.com/10697017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155731 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for multiple parameters to Extension API callbacks.mtytel@chromium.org2012-07-121-7/+9
| | | | | | | | | | BUG=135269 TEST= Review URL: https://chromiumcodereview.appspot.com/10694106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146469 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Move Extension into extensions namespaceaa@chromium.org2012-05-211-4/+7
| | | | | | | | | BUG=117262 TBR=aa@chromium.org Review URL: https://chromiumcodereview.appspot.com/10375021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138074 0039d316-1c4b-4281-b951-d872f2087c98
* Alarm resolution changed to minutes and minimum delay added.mtytel@chromium.org2012-05-051-1/+7
| | | | | | | | | | | | | There is a 5 minute minimum delay enforced for released extensions and a 0 minute delay enforced for extensions in development. BUG=122821 TEST=Call chrome.experimental.alarms.create and verify that the alarm is delayed in the number of minutes passed in. Review URL: http://codereview.chromium.org/10217018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135559 0039d316-1c4b-4281-b951-d872f2087c98
* Added populate parameter to chrome.windows.get, chrome.windows.getCurrent,mtytel@chromium.org2011-12-191-0/+3
| | | | | | | | | | | chrome.windows.getLastFocused BUG=53516 TEST=Run chrome.windows.get(id, {"populate":true}, fun) from an extension Review URL: http://codereview.chromium.org/8969011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114963 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor to allow same code to test both sync and async functions.miket@chromium.org2011-11-221-16/+8
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/8588067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111050 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for management API related to escalated permissions disabled extensionsasargent@chromium.org2011-11-161-0/+8
| | | | | | | | | | | | | | | | | | The general approach is to require user gesture and put up the confirmation UI if an extension wants to re-enable a disabled-due-to-permissions-escalation extension. Also added some new infrastructure for making this easier to test. (This is re-landing http://codereview.chromium.org/8423069/ which had a compile error on the cros_tegra2 bot) BUG=102579 TEST=See bug TBR=aa@chromium.org Review URL: http://codereview.chromium.org/8488012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110376 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 110264 - Fix for management API related to escalated permissions ↵dpolukhin@chromium.org2011-11-161-8/+0
| | | | | | | | | | | | | | | | | | | disabled extensions The general approach is to require user gesture and put up the confirmation UI if an extension wants to re-enable a disabled-due-to-permissions-escalation extension. Also added some new infrastructure for making this easier to test. BUG=102579 TEST=See bug Review URL: http://codereview.chromium.org/8423069 TBR=asargent@chromium.org Review URL: http://codereview.chromium.org/8520035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110268 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for management API related to escalated permissions disabled extensionsasargent@chromium.org2011-11-161-0/+8
| | | | | | | | | | | | | | The general approach is to require user gesture and put up the confirmation UI if an extension wants to re-enable a disabled-due-to-permissions-escalation extension. Also added some new infrastructure for making this easier to test. BUG=102579 TEST=See bug Review URL: http://codereview.chromium.org/8423069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110264 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ExtensionApiTest.TabUpdateNoPermissions timeoutsmihaip@chromium.org2011-10-141-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Switch testing of chrome.tabs.update with no tabs permission from an API test to an InProcessBrowserTest that calls the extension function directly. This should hopefully be more reliable, especially on overloaded/slow bots. Test run times (in milliseconds): API Test C++ Test Normal 16-thread z600: 3809 2209 1 CPU enabled: 4036 2256 1 CPU + lookbusy -c 99 -n 2: 7342 3138 1 CPU + lookbusy -c 99 -n 4: 10705 3481 1 CPU + lookbusy -c 99 -n 8: 17830 6142 Also removes a bunch of StartTestServer() calls from other tabs API tests, since they're not necessary (and are also causing slower run times). BUG=98383 R=aa@chromium.org Review URL: http://codereview.chromium.org/8274023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105609 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r103624 - Add ExtensionFunctionTest base class and a testaa@chromium.org2011-10-011-0/+82
| | | | | | | | for GetWindowFunction using it. Review URL: http://codereview.chromium.org/8098023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103651 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 103536 - Add ExtensionFunctionTest base class and a test foraa@chromium.org2011-09-301-82/+0
| | | | | | | | | | | GetWindowFunction using it. Review URL: http://codereview.chromium.org/8065027 TBR=aa@chromium.org Review URL: http://codereview.chromium.org/8102011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103552 0039d316-1c4b-4281-b951-d872f2087c98
* Add ExtensionFunctionTest base class and a test foraa@chromium.org2011-09-301-0/+82
GetWindowFunction using it. Review URL: http://codereview.chromium.org/8065027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103536 0039d316-1c4b-4281-b951-d872f2087c98