| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For some unittests that run full worker registration process
(e.g. ServiceWorkerContextTest, ServiceWorkerDispatcherHostTest
and ServiceWorkerJobTest) it doesn't make sense to call
SimulateAddProcess() or SimulateCreateWorker() just to
ensure the TestHelper is enabled as an IPC sender for the process.
(Because they internally add processes to a newly created worker
in the registration)
This CL:
- Changes EmbeddedWorkerTestHelper to take an initial renderer process ID as its ctor parameter so that the helper can be used as an IPC sender for the process from the beginning
- Renames SimulateAddProcess() to SimulateAddProcessToWorker() for better clarity
- Removes SimulateCreateWorker() as it's not really necessary
- Removes SimulateRemoveProcess() as no one's calling it for now (YAGNI)
BUG=313530
TEST=content_unittests:ServiceWorker*
Review URL: https://codereview.chromium.org/137123011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250075 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the starting of the server worker to the registration
job pipeline. Eventually this will also dispatch the 'install'
event.
A second version of this, based on kinuko's work
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=249544
Review URL: https://codereview.chromium.org/140743012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249828 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://codereview.chromium.org/140743012/)
Reason for revert:
Makes virtual/serviceworker/http/tests/serviceworker/registration.html crash.
See http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux/builds/26615
Original issue's description:
> Start EmbeddedWorker during registration - take 2
>
> This adds the starting of the server worker to the registration
> job pipeline. Eventually this will also dispatch the 'install'
> event.
>
> A second version of this, based on kinuko's work
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=249544
TBR=kinuko@chromium.org,alecflett@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/137233019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249674 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the starting of the server worker to the registration
job pipeline. Eventually this will also dispatch the 'install'
event.
A second version of this, based on kinuko's work
Review URL: https://codereview.chromium.org/140743012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249544 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to load a test page (service_worker/index.html) that calls
'registerServiceWorker()', but it'll be kicking more background jobs
(like registration jobs) after more patches land, so this patch
changes the common test setup process to load an empty page which
has no (or much less) side effect.
This also removes test-only hacky method
ServiceWorkerContextCore::GetAllProviderHosts().
BUG=313530
TEST=content_browsertests:ServiceWorker\*
Review URL: https://codereview.chromium.org/141163022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249448 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=313530
TEST=existing EW tests should pass
Review URL: https://codereview.chromium.org/149673005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249387 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This doesn't hook any blink code yet, but sends InstallEvent to the
child process and dispatches callback for InstallEventFinished response.
This depends on: https://codereview.chromium.org/139923005/
BUG=313530
TEST=ServiceWorkerBrowserTest.Install
Review URL: https://codereview.chromium.org/142863009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249201 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a preparation to implement DispatchInstallEvent(), this implements
following two methods:
- SendMessage()
- SendMessageAndRegisterCallback()
Unlike my previous patches, this supports:
- Sending messages without explicitly starting the worker
- Sending multiple messages concurrently
- Receiving a response for each message
Now each message can be sent with a unique 'request_id', which can be
used to send back a response to a particular message.
BUG=313530
TEST=ServiceWorkerVersionTest.\*
R=alecflett@chromium.org
Review URL: https://codereview.chromium.org/139923005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248889 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
** NOTE: No functional changes in regular cases, existing code should just work **
- Stop using multiple observers
- Allow concurrent Start/Stop
- Add service_worker_version_unittest
For cleanup & as a preparation for implementing more robust SendMessage/DispatchInstallEvent
BUG=313530
TEST=ServiceWorkerVersionTest.*
R=alecflett@chromium.org
TBR=jam
Review URL: https://codereview.chromium.org/150443002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248674 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
PROCESS_NOT_FOUND etc)
BUG=313530
Review URL: https://codereview.chromium.org/147593006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247845 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Also adds content_browsertests for start & stop flow
BUG=313530
TEST=content_browsertests:ServiceWorkerBrowserTest.\*
Review URL: https://codereview.chromium.org/145033012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247380 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Testing starting/stopping EmbeddedWorker without creating a child process
is not very easy, so I've implemented a test helper class that can be
used for in-process EW tests, and revised EmbeddedWorkerInstanceTest to
use the helper so that how it can be used becomes clear.
The EmbeddedWorkerTestHelper class does:
- Record IPC messages sent via EmbeddedWorkerRegistry
- Provide customizable methods to respond to StartWorker/StopWorker/MessageToWorker messages
Depends on SW/EW separation patch (https://codereview.chromium.org/140893002/)
This patch doesn't include install flow yet.
BUG=313530
TEST=EmbeddedWorkerInstanceTest.*
TBR=jam
Review URL: https://codereview.chromium.org/138903005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246834 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Could we have something like it?
We'll still need some if/switch code in each module to filter out
irrelevant status code, but having a central status code usually
makes things easier:
- less switch/case between small module boundaries
- single StatusCodeToString method for error reporting and debugging
BUG=285976
R=alecflett@chromium.org
TBR=jam
Review URL: https://codereview.chromium.org/142973003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246832 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
incomplete)
I'm still a bit unsure about bringing separation here is a good thing,
but this patch adds slightly clearer separation between them.
* EmbeddedWorkerInstance now has generic SendMessage() and
OnMessageReceived() observer method (instead of SendFetchRequest etc)
* ServiceWorker's script context messages are sent and dispatched from/to
ServiceWorkerVersion to/from ServiceWorkerScriptContext via EW layer.
* EW/SW separation in blink and dispatcher_host is not made yet (and no plan to add it for now)
BUG=313530
TBR=avi
Review URL: https://codereview.chromium.org/140893002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246276 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=n/a
TEST=compile (mechanical changes only)
TBR=michaeln@chromium.orgjochen@chromium.org
Review URL: https://codereview.chromium.org/136573007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245533 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test does:
- kick registerServiceWorker (primarily for installing ServiceWorkerProviderHost)
- manually associate ServiceWorkerProviderHost to an EmbeddedWorker (eventually this should be done via ServiceWorkerVersion)
- Start and stop the EmbeddedWorker, and observe OnStarted/OnStopped msgs are sent from the child process
BUG=313530, 285976
TEST=ServiceWorkerBrowserTest.EmbeddedWorkerBasic
Review URL: https://codereview.chromium.org/127573002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244960 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
The JobQueue wasn't deleting the jobs after they finished.
TBR=kinuko@chromium.org
BUG=
Review URL: https://codereview.chromium.org/132823002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244016 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To handle the case of multiple registration requests coming in at the same time,
the ServiceWorkerJobCoordinator now keeps a queue of registration events for each pattern.
When a new registration request comes in for a pattern, it looks to see if the most recent request (at the back of the queue) is identical, and if so, piggy-backs on that request rather than creating a new one.
BUG=285976
Review URL: https://codereview.chromium.org/126603002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243999 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So that we can rely on IPC_MESSAGE_CLASS(msg) check to
determine which messages we want to relay onto another thread.
Mostly just shuffling,
- Separated EmbeddedWorker messages out of service_worker_messages.h into embedded_worker_messages.h
- Added a new message class for that
- Created a new directory content/common/service_worker (and OWNERS file) as now we have multiple header files for SW under common/
BUG=313530
Review URL: https://codereview.chromium.org/127583002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243871 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This makes ServiceWorkerStorage return to being a mostly stateless class,
at least with respect to jobs, and in fact it is now ignorant of registraiton jobs. This CL is purely mechanical, moving tests and functions around without altering any behavior.
BUG=
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/113133013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243759 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
child process
- Add ServiceWorkerHostMsg_WorkerStarted and ServiceWorkerHostMsg_WorkerStopped
that are sent from embedded worker to the browser process
- Add ServiceWorkerContextMsg_FetchEvent for messages from embedded worker
to the browser process
FetchEvent/FetchRequest code is a bit rough as it's meant to be
a placeholder. I can remove the part from this CL if it doesn't
look reay yet.
The new code uses new IPC class (ServiceWorkerContextMsg) for dispatching
messages specifically sent to the embedded workers's worker context,
which may feel a bit noisy. (Alternative suggestions welcome)
BUG=313530
R=alecflett@chromium.org, jochen@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/118103002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243081 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=330556
TEST=no change
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/121033002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242483 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This hooks up the in-memory registration to IPC so it can be called by the renderer.
Can't land until http://crrev.com/107293009 lands in blink
BUG=285976
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/102533004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240879 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding two new classes, EmbeddedWorkerRegistry and EmbeddedWorkerInstance.
Technically they can be implemented within ServiceWorkerContextCore and
ServiceWorkerVersion, but here I wrote them in separate classes for logical
separation.
* EmbeddedWorkerRegistry
-- Hangs off the ServiceWorkerContextCore
-- Acts as a stub between MessageFilter and each EmbeddedWorkerInstance
-- Sends/receives messages to/from each EmbeddedWorker in child process
-- Mostly talks only with MessageFilter and EmbeddedWorkerInstance
* EmbeddedWorkerInstance
-- ServiceWorkerVersion will own it (1:1 relation)
-- Provides an interface to interact (Start/Stop/Execute) with an EmbeddedWorker
BUG=313530
TBR=jochen
Review URL: https://codereview.chromium.org/85023003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240030 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simply provides an in-memory registration in ServiceWorkerContext. It provides basic registration/unregistration,
adding stub ServiceWorkerRegistry and ServiceWorkerVersion classes.
BUG=285976
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/62203007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239380 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=285976
Review URL: https://codereview.chromium.org/70533005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236872 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This stubs out the basic registration classes, spun out of http://crrev.com/62203007. Tests are included which make sure that shutdown is reliable. A single, simplistic ActivateInWaitingVersion() exists as a way to demonstrate the relationship between in-waiting and active versions.
BUG=
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/70683002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235639 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor the 'context' class to have a thread-safe refcounted wrapper for use by higher level chromium code, and a single-threaded nonrefcounted core for use in the service worker lib. Added explicit Init() and Shutdown() methods on the wrapper class which are used by StoragePartitionImpl to get things started and cleaned up.
TBR=jam
BUG=285976
Review URL: https://codereview.chromium.org/61023005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234756 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This CL updates all references to the WebKit namespace in content.
TBR=darin@chromium.org
BUG=295096
Review URL: https://codereview.chromium.org/63253002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233513 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces use of WebServiceWorkerError as a means to propagate an
error from the browser to the renderer, and further reflect this error via
WebCallbacks into Blink
BUG=285976
R=jam@chromium.org, michaeln@chromium.org, tsepez@chromium.org
TBR=abarth
Review URL: https://codereview.chromium.org/26442004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233438 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a first cut at getting registerServiceWorker() to make
a full round trip from and back into blink. At the moment the browser process
just sends a dummy value back to the renderer over IPC.
BUG=285976
Review URL: https://codereview.chromium.org/25008006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231688 0039d316-1c4b-4281-b951-d872f2087c98
|
|
This is the initial cut for the browser-side NavigationControllerDispatcherHost,
and all the various related support plumbing to hook up two initial messages.
BUG= 285976
Review URL: https://chromiumcodereview.appspot.com/23615009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224585 0039d316-1c4b-4281-b951-d872f2087c98
|