summaryrefslogtreecommitdiffstats
path: root/extensions/browser/api_test_utils.cc
Commit message (Collapse)AuthorAgeFilesLines
* Convert Pass()→std::move() in //extensionsdcheng2015-12-181-7/+9
| | | | | | | | BUG=557422 Review URL: https://codereview.chromium.org/1537893002 Cr-Commit-Position: refs/heads/master@{#366120}
* Don't use base::MessageLoop::{Quit,QuitClosure} in extensions/, ipc/ki.stfu2015-10-121-1/+1
| | | | | | | | | | | | | This patch renames base::MessageLoop::{Quit,QuitClosure} to base::MessageLoop::{QuitWhenIdle,QuitWhenIdleClosure}. BUG=131220 TEST= R=finnur@chromium.org,agl@chromium.org Review URL: https://codereview.chromium.org/1389163008 Cr-Commit-Position: refs/heads/master@{#353545}
* Add scoped_ptr-safe base::Value to Dictionary/List conversion functions.reillyg2015-09-111-10/+2
| | | | | | | | | | | | | | | | | | | | This change adds two static From() functions to the DictionaryValue and ListValue classes which take a scoped_ptr to a Value and either convert it to a scoped_ptr to a DictionaryValue or ListValue, or return nullptr. These are intended to replace the existing pattern, make_scoped_ptr(static_cast<base::DictionaryValue*>(value.release())) with the shorter and safer alternative, base::DictionaryValue::From(value.Pass()) Instances of this pattern in //extensions have been converted as examples. Review URL: https://codereview.chromium.org/1308013005 Cr-Commit-Position: refs/heads/master@{#348294}
* [Extensions] Clean up the handling of ExtensionHostMsg_Requestrdevlin.cronin2015-06-101-17/+3
| | | | | | | | | | | | | | | | | | | | | | ExtensionHostMsg_Request is sent when an extension calls an API function. Before this patch, this IPC would be sent to one of 11 different call sites, all of which then routed it to the ExtensionFunctionDispatcher - and all of which have to implement ExtensionFunctionDispatcher::Delegate. Instead, have ExtensionWebContentsObserver handle the IPC, since it is created (or should be) for all extension web contents. This also lets us eliminate many (though not all) of the ExtensionFunctionDispatcher::Delegate implementations (I will try to clean more up in a later patch). The size of this patch is due to a number of yaks that needed shaving along the way - in particular, around GuestView. BUG=498017 BUG=405246 Review URL: https://codereview.chromium.org/1169223002 Cr-Commit-Position: refs/heads/master@{#333843}
* Use scoped_ptrs in JSONReader::Read functions.estade2015-05-221-14/+16
| | | | | | | | | | | | | | | | | | | | There are many callers, so all could not be updated at once. The old version is renamed to JSONReader::DeprecatedRead, and a new version of JSONReader::Read that returns scoped_ptr takes its place. Much of this patch was generated with sed. Some callsites of the form scoped_ptr<Value> value(Read()); have been updated to scoped_ptr<Value> value = Read(); but most Read() calls are simply converted to DeprecatedRead. Actually updating them is a TODO. BUG=none Review URL: https://codereview.chromium.org/1136643005 Cr-Commit-Position: refs/heads/master@{#331120}
* Move chrome.alarms API from chrome/ to extensions/.sudarsana.nagineni2015-01-311-0/+7
| | | | | | | | | | | | | | | | | | | 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}
* Move system.display tests to extensions/thiago.santos2014-12-231-0/+52
| | | | | | | | | | | | | Also copy a few helper functions from extension_function_test_utils.h to api_test_utils.h so we don't need to depend on chrome/. These helper functions are needed by tests other than the display test and will help with the migration. BUG=392842 Review URL: https://codereview.chromium.org/779083002 Cr-Commit-Position: refs/heads/master@{#309514}
* Standardize usage of virtual/override/final in extensions/dcheng2014-10-211-4/+4
| | | | | | | | | | | | This patch was automatically generated by applying clang fixit hints generated by the plugin to the source tree. BUG=417463 TBR=yoz@chromium.org Review URL: https://codereview.chromium.org/664933004 Cr-Commit-Position: refs/heads/master@{#300475}
* replace OVERRIDE and FINAL with override and final in extensions/mostynb2014-10-031-1/+1
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/622343002 Cr-Commit-Position: refs/heads/master@{#298042}
* Move extensions power API unit test to extensions_unittestsjamescook2014-09-091-0/+9
| | | | | | | | | | | It was running in Chrome's unit_tests suite for historical reasons. BUG=397164 TEST=extensions_unittests Review URL: https://codereview.chromium.org/554963002 Cr-Commit-Position: refs/heads/master@{#293946}
* Rework ExtensionApiUnittest to run in extensions_unittests, removing its ↵yoz2014-08-281-0/+21
| | | | | | | | | | | | 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-3/+12
| | | | | | | 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
* Move SocketsTcpApiTest.SocketsTcpCreateGood to app_shell_browsertests.dhnishi@chromium.org2014-08-091-3/+37
| | | | | | | | | BUG=388893 Review URL: https://codereview.chromium.org/449303002 Cr-Commit-Position: refs/heads/master@{#288495} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288495 0039d316-1c4b-4281-b951-d872f2087c98
* Move DnsApiTest.DnsResolveIPLiteral and DnsApiTest.DnsResolveHostname to ↵yoz@chromium.org2014-07-231-0/+132
app_shell_browsertests. This results in a significant speedup; tests run in <500ms instead of >2s because the lengthy browser_tests startup is avoided. This clones some aspects of extension_function_test_utils into extensions/browser/api_test_utils.cc. Later CLs will clean up the redundancy. BUG=388893 Review URL: https://codereview.chromium.org/394103004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284872 0039d316-1c4b-4281-b951-d872f2087c98