Commit Graph

1706 Commits

Author SHA1 Message Date
Ehsan Akhgari
f9ee94b84e Bug 1130101 - Part 3: Add unit tests for the handling of the Service-Worker-Allowed header; r=nsm 2015-05-07 21:07:10 -04:00
Ehsan Akhgari
5b8b93bec9 Bug 1130101 - Part 2: Honor the Service-Worker-Allowed header when prefix matching the service worker scope; r=nsm 2015-05-07 21:06:34 -04:00
Ehsan Akhgari
1a3375d154 Bug 1130101 - Part 1: Store the value of the Service-Worker-Allowed header in the CompareManager object; r=nsm 2015-05-07 21:06:33 -04:00
Nikhil Marathe
ec4aaed52f Bug 1150959 - Log rejected Promise error message to browser console 2015-04-08 16:04:12 -07:00
Nikhil Marathe
d00e1f0428 Bug 1080109 - Clear ServiceWorkers when clearing history or forgetting about site. r=baku,ehsan 2015-03-05 17:37:49 -08:00
Ehsan Akhgari
3cf702a1ce Bug 1162787 - Make the service worker periodic tests robust to the idle daily service firing its notification when the tests are being run; r=nsm 2015-05-07 16:23:50 -07:00
Ehsan Akhgari
a5c897787c Bug 1159378 - Part 4: Add a unit test for periodic updates of service workers on HTTPS origins; r=nsm
The reason why this test is interesting here is that it tests the code
path added in the part 2 of this bug.
2015-05-04 10:18:19 -04:00
Ehsan Akhgari
06cf844bd9 Bug 1159378 - Part 3: Refactor the logic of test_periodic_update.html into a helper script; r=nsm
This helper script will allow us to run the same test across both HTTP
and HTTPS origins.  This patch also uses postMessage instead of a direct
function call on the parent window, because in the HTTPS case, that
window will be cross-origin.  It also moves the code to trigger the
update and get the corresponding updatefound event to
wait_for_update.html, since getting the service worker registration
cross-origin is not possible.
2015-05-04 10:18:12 -04:00
Ehsan Akhgari
75d02038c7 Bug 1159378 - Part 2: When storing the service worker downloaded after a failed network compare into the cache, store its security info in the cache as well; r=nsm 2015-05-04 10:18:01 -04:00
Nikhil Marathe
b9f39271ea Bug 1154494 - patch 2 - Hold a ref to the sandbox. r=baku 2015-05-04 13:02:12 -04:00
Nikhil Marathe
ba01e3a362 Bug 1154494 - Hit network only once. r=baku,bkelly 2015-04-13 21:05:28 -07:00
Wes Kocher
e5af10f401 Backed out changeset 57f0b16030e9 (bug 1162013) for m-oth and m-dt3 bustage CLOSED TREE 2015-05-07 13:37:27 -07:00
Boris Zbarsky
1faf3d6765 Bug 1162013. Process the Promise queue between adjacent setTimeout callback invocations when we're going through the callback list without returning to the event loop. r=smaug 2015-05-07 14:49:31 -04:00
Ben Turner
8389e4d753 Bug 1162218 - Make worker idle thread timeouts more strict, r=baku. 2015-05-07 10:35:57 -07:00
Andrea Marchesini
3df5f033c0 Bug 1156875 - patch 2 - Unify the registration of blob URIs in WorkerPrivate and nsIGlobalObject, r=bent 2015-05-07 08:06:24 +01:00
Andrea Marchesini
a90c5be53e Bug 1156875 - patch 1 - URL.createObjectURL leaks in JS sandbox, r=bholley 2015-05-07 08:05:43 +01:00
Ehsan Akhgari
e8240458bc Bug 1148818 - Re-enable the Cache part of test_request_context.html on Android now that it passes 2015-05-06 08:15:24 -04:00
Ehsan Akhgari
e1b13dac41 Clean up after test_workerupdatefoundevent.html, no bug 2015-05-05 21:45:00 -04:00
Ehsan Akhgari
5c829dd715 Revert the debugging patch for bug 1157901 2015-05-05 21:43:53 -04:00
Boris Zbarsky
2b2824bbc7 Bug 1160628. Speed up the URL constructor in the common case of no base URI. r=baku 2015-05-05 13:38:56 -04:00
Boris Zbarsky
9251502233 Bug 1161036 part 2. Only force-enable dom cache in test_serviceworker_interfaces if we're having to force-enable servicewceworkers too. r=bkelly 2015-05-05 13:38:56 -04:00
Ehsan Akhgari
af7e2c03b6 Bug 1134325 - Part 2: Correctly reflect the Request's body to the service worker's fetch event; r=jdm 2015-05-05 13:20:54 -04:00
Ehsan Akhgari
be033191ac Bug 1161239 - Emit a warning if the respondWith handler is resolved with a non-Object value; r=baku 2015-05-05 09:56:48 -04:00
Ehsan Akhgari
b9872b41a7 Bug 1159813 - Make sure service worker tests clean up after themselves; r=baku
This makes it possible to run the service workers tests using
--run-until-failure, which will hopefully help with reproducing
intermittent test failures.
2015-05-04 09:21:04 -04:00
Andrew McCreight
254dac5936 Bug 1152551, part 3 - Fix more mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Andrew McCreight
aeff7c99ee Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Andrea Marchesini
b64e5cbce8 Bug 1157627 - about:serviceworkers should show new registered ServiceWorkers. r=nsm 2015-04-30 15:32:47 +01:00
Boris Zbarsky
6d08737247 Bug 1160215. Get rid of the now-unused workerTestGetPrefs bits. r=bkelly 2015-05-01 11:42:37 -04:00
Boris Zbarsky
5af84baf2f Bug 1159742. Get rid of the pref annotation from test_interfaces, since it basically corresponds to disabling the test. r=jst 2015-05-01 11:42:37 -04:00
Ben Kelly
ee0372aa27 Bug 1134841 Hold ServiceWorker alive during install event's waitUntil(). r=bz 2015-05-01 08:14:42 -07:00
Boris Zbarsky
7988a3d75a Bug 1160190. Remove most of the pref annotations in test_interfaces and test_worker_interfaces. r=jst 2015-04-30 23:08:44 -04:00
Daniel Holbert
22d504ffe5 Bug 1156847 followup: annotate workers helper-class "ScriptLoaderRunnable" OnStartRequest/OnStopRequest as override. rs=ehsan 2015-04-30 11:42:16 -07:00
Phil Ringnalda
1e8e49ef32 Backed out changeset d90e308bfb98 (bug 1159813) for "test_importscript.html | Unregister should return true" failures
CLOSED TREE
2015-04-29 20:15:34 -07:00
Ehsan Akhgari
677818a103 Bug 1159813 - Make sure service worker tests clean up after themselves; r=baku
This makes it possible to run the service workers tests using
--run-until-failure, which will hopefully help with reproducing
intermittent test failures.
2015-04-29 20:22:32 -04:00
Ehsan Akhgari
20732c54da Bug 1156847 - Part 7: Add unit tests for responding to a FetchEvent with a synthesized Response both in the case where the service worker is loaded from the network and from the cache; r=nsm 2015-04-29 20:22:31 -04:00
Ehsan Akhgari
2e1174adfe Bug 1156847 - Part 6: When calling FetchEvent.respondWith(), fall back to the security info of the service worker if the Response object that we are responding with doesn't have its own security info; r=nsm
This case will only happen if we're responding with a synthesized Response object.
Response objects obtained through fetch() already have their correct security
info.
2015-04-29 20:22:31 -04:00
Ehsan Akhgari
7f089a0114 Bug 1156847 - Part 5: When loading a service worker from the cache, set its security info on the WorkerPrivate; r=nsm 2015-04-29 20:22:30 -04:00
Ehsan Akhgari
7f7fe4d421 Bug 1156847 - Part 4: When storing a service worker script to the cache, store its security info in the cache as well; r=khuey
Before this patch, we would call Cache.put() before opening the channel,
which means that we have no way of knowing the security info for the
channel in order to set it on the Response object that we synthesize.
This patch adds an nsIRequestObserver to the tee created for piping the
body of the response to the cache, and delays calling Cache.put() until
we receive the nsIRequestObserver::OnStartRequest() notification, at
which point we set the obtained security info on the Response object to
be stored in the cache.
2015-04-29 20:22:29 -04:00
Ehsan Akhgari
01fa7d5c42 Bug 1156847 - Part 3: When loading a service worker from the network, remember the security info of the channel on the WorkerPrivate; r=nsm 2015-04-29 20:22:28 -04:00
Ehsan Akhgari
4b18277e46 Bug 1156847 - Part 2: Store the security info for a service worker on its WorkerPrivate; r=bent,khuey 2015-04-29 20:22:27 -04:00
Tooru Fujisawa
4397f3f321 Bug 1102219 - Part 5: Replace more String.prototype.contains with String.prototype.includes in chrome code. r=till 2015-04-30 00:32:05 +09:00
ziyunfei
a2bb96ff77 Bug 1102219 - Part 4: Replace String.prototype.contains with String.prototype.includes in chrome code. r=till 2015-04-30 00:32:05 +09:00
Ehsan Akhgari
9d9f6cdd75 Debugging patch for bug 1157901 2015-04-29 08:31:29 -04:00
Doug Turner
a96a9b4596 Bug 1147214 - Allow app: urls to use sw. r=baku 2015-04-25 08:27:50 +02:00
Makoto Kato
e5ebd5c587 Bug 866301 - Part 4. Turn on Intl API for B2G. r=fabrice,waldo 2015-04-28 18:59:53 +09:00
David Major
c92c020b89 Bug 1157835: Remove the MSVC_ENABLE_PGO flag from the build system. r=glandium 2015-04-27 19:59:27 -04:00
Boris Zbarsky
7c563264f9 Bug 1155984. Improve the performance of the "self" getter in both window and workers. r=peterv,jorendorff 2015-04-27 13:38:12 -04:00
Ehsan Akhgari
30b734813e Bug 1136780 - Re-enable test_fetch_event.html now that bug 1156771 has been fixed; r=nsm 2015-04-27 13:04:24 -04:00
Nathan Froyd
6460d3e650 Bug 1158320 - rename nsThread::mRunningEvent to mNestedEventLoopDepth; r=bsmedberg
The current name reads to me like a boolean variable, even though it's
actually a counter.  Try to make that property more explicit at its uses
by renaming it to something more evocative of counter-ness.
2015-04-24 16:04:50 -04:00
Boris Zbarsky
7f61a6b625 Bug 1157898 part 5. Eliminate the remaining non-ErrorResult consumers of ErrorResult::ErrorCode and make it protected. r=peterv 2015-04-27 09:18:52 -04:00
Boris Zbarsky
84a1df27d6 Bug 1157898 part 3. Fix the remaining consumers of rv.ErrorCode() in NS_ENSURE_* expressions to not do that. r=peterv 2015-04-27 09:18:52 -04:00
Boris Zbarsky
ef887403cb Bug 1157898 part 1. Make code of the form "return rv.ErrorCode();" where rv is an ErrorResult use StealNSResult instead. r=peterv
This patch was generated with the following command:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 's/return ([a-zA-Z0-9]+)\.ErrorCode\(\);/return \1.StealNSResult();/'
2015-04-27 09:18:51 -04:00
Dragana Damjanovic
5fe45aad54 Bug 1156397 - some fix for webpush PushServer. r=dougt r=nsm 2015-04-24 14:55:00 +02:00
Andrea Marchesini
7449b89cb3 Bug 1125205 - Display console API messages from shared or service workers to the web console, r=past 2015-04-26 09:37:59 +01:00
L. David Baron
7976fd0f86 Back out bug 1154494 (changeset 94c2f1d254e7 and changeset d1269f811e05) for causing intermittent orange in various service worker tests. 2015-04-25 15:07:54 -07:00
Ehsan Akhgari
b24cb60102 Bug 1157467 - Work around leaks in test_request_context.html in e10s; r=nsm 2015-04-25 01:12:41 -04:00
Daniel Holbert
1c9e365756 Bug 1154494 followup: Annotate ServiceWorker helper-class 'CompareManager' refcounting functions as 'override'. rs=ehsan 2015-04-24 21:26:51 -07:00
Nikhil Marathe
65f2b4be1a Bug 1154494 - Hit network only once. r=baku,bkelly 2015-04-13 21:05:28 -07:00
Nikhil Marathe
6655dd07c4 Bug 1157692 - Add dom.caches.enabled pref to test. r=bkelly 2015-04-23 08:46:03 -07:00
Wes Kocher
c549a41ac9 Backed out changeset a12f0f05779c (bug 1125205) for dt4 failures CLOSED TREE 2015-04-24 13:06:46 -07:00
Ben Kelly
77773c0bee Bug 1158218 Follow-up to fix mis-indentation. DONTBUILD, whitespace-only r=me 2015-04-24 11:55:06 -07:00
Ben Kelly
fbc0db20fa Bug 1158218 Improve ServiceWorkerManager NS_WARNINGS on failure. r=nsm 2015-04-24 11:42:13 -07:00
Andrea Marchesini
b0b8971886 Bug 1125205 - Display console API messages from Shared or Service Workers to the webconsole, r=past 2015-04-24 19:12:30 +01:00
Ehsan Akhgari
1e5318df37 Back out bug 1154494 for test bustage on a CLOSED TREE 2015-04-23 16:59:24 -04:00
Nikhil Marathe
a76bd62e6b Bug 1154494 - Hit network only once. r=baku,bkelly 2015-04-23 16:00:58 -04:00
Doug Turner
a9c42570f8 Bug 1157108 - onpush EventHandler support. r=ehsan 2015-04-23 20:43:40 +02:00
Daniel Holbert
e45ae32742 Bug 1131327 followup: Add 'override' annotation to WorkerListener refcounting functions. rs=ehsan 2015-04-23 09:20:08 -07:00
Nikhil Marathe
715428eb35 Bug 1131327 - Patch 10 - Remember to remove the feature. r=baku 2015-04-17 16:44:58 -07:00
Nikhil Marathe
db53f7a5e8 Bug 1131327 - Patch 9 - Fix windows compiler macro error. r=baku 2015-04-16 12:53:14 -07:00
Nikhil Marathe
0e0194f41c Bug 1131327 - Patch 8 - Return null on worker attribute access. r=baku 2015-04-14 16:12:59 -07:00
Nikhil Marathe
60d2f6e781 Bug 1131327 - Patch 7 - Fire updatefound on worker registration. r=baku 2015-04-08 15:22:36 -07:00
Nikhil Marathe
e502918a0e Bug 1131327 - Patch 6 - SWM holds ServiceWorkerRegistrationListener for updatefound and invalidation notifications. r=baku
Splits up the listener interface to which SWM can hold rawptrs so that registration objects living on the worker thread can use awkward proxies to listen to these events.
2015-04-08 13:13:32 -07:00
Nikhil Marathe
f5565162bb Bug 1131327 - Patch 5 - Implement ServiceWorkerRegistration.unregister() on worker. r=baku 2015-04-07 14:17:02 -07:00
Nikhil Marathe
a17b1f8132 Bug 1131327 - Patch 4 - Implement ServiceWorkerRegistration.update() on worker. r=baku
ServiceWorkerGlobalScope::Registration() now returns initialized registration.
2015-04-07 11:50:08 -07:00
Nikhil Marathe
565637850b Bug 1131327 - Patch 3 - move event listeners to main thread class. r=baku 2015-04-07 13:09:07 -07:00
Nikhil Marathe
dc1c6a0c24 Bug 1131327 - Patch 2 - Expose to workers. r=baku
This patch exposes ServiceWorkerRegistration (and ServiceWorker to satisfy constraints) to workers.

For now, a null registration is returned in the worker.
2015-04-03 22:46:07 -07:00
Nikhil Marathe
b79d343a14 Bug 1131327 - Patch 1 - Introduce ServiceWorkerRegistration{Base,MainThread,WorkerThread} r=baku 2015-04-03 15:18:55 -07:00
Nikhil Marathe
13399bc3c8 Bug 1131350 - Move update() to ServiceWorkerRegistration. r=baku 2015-03-19 18:09:10 -07:00
Jan de Mooij
bfb27c97d1 Bug 1155946 part 1 - Add a mayResolve class hook to optimize objects with resolve hooks better. r=bhackett 2015-04-23 15:51:28 +02:00
Ehsan Akhgari
a2123e6825 Bug 1157544 - Fix a typo in the test; r=baku 2015-04-23 08:31:29 -04:00
Andrea Marchesini
7ed448d7f2 Bug 1155546 - Implement WorkerControlRunnable::Cancel(), r=bent 2015-04-22 09:03:52 +02:00
Andrea Marchesini
504f4e8fee Bug 1156632 - Remove unused forward class declarations - patch 2 - dom/media, dom/indexedDB, dom/svg, r=ehsan 2015-04-22 08:29:17 +02:00
Rahul
1267ab5733 Bug 1152473 - Remove InstallEvent. r=nsm,ehsan 2015-04-20 18:47:13 -07:00
Ehsan Akhgari
d892b414b0 Bug 1156432 - Part 2: Use different error messages for the hello-after-extracting.gz test; r=nsm
This helps make it eaiser to tell whether this or the hello.gz
test failed by just looking at the logs.
2015-04-21 00:25:15 -04:00
Ehsan Akhgari
fb4770489b Bug 1156432 - Part 1: Unregister the service worker when we are done with it; r=nsm
This lets us for example use the --run-until-failure mochitest option.
2015-04-21 00:25:08 -04:00
Ehsan Akhgari
554079ffb2 Bug 1155989 - Dump the rejection of the promise returned by ServiceWorkerRegistration.unregister() in our tests; r=nsm 2015-04-21 00:24:44 -04:00
Ehsan Akhgari
e5c186b614 Bug 1155988 - Use the ready promise more often in service worker tests; r=nsm 2015-04-21 00:23:22 -04:00
Ehsan Akhgari
5138d67d59 Bug 1155987 - Unregister the service workers registered in tests; r=nsm
Without this, test_periodic_update.html is going to try to update all
of them which is unnecessary.
2015-04-21 00:21:30 -04:00
Ben Kelly
1d022d6e67 Bug 1151974 P2 Re-enable serviceworkers/test_periodic_update.html. r=ehsan 2015-04-20 11:14:57 -07:00
Denis Volk
4ad62045e8 Bug 1095098 - move do_QueryObject templates into their own header; r=froydnj 2015-04-15 12:47:03 -04:00
Jim Blandy
a52b425862 Bug 1152577: Add 'aReason' argument to AutoEntryScript constructor, and provide plausible names for its instantiations. r=bholley 2015-04-08 21:23:48 -04:00
Wes Kocher
9887c40fa3 Bug 1154813 - Typo fix that broke builds CLOSED TREE 2015-04-17 16:06:54 -07:00
Nikhil Marathe
656362d19b Bug 1137287 - Part 0: Test for synthesized redirects. r=jdm 2015-02-26 11:53:51 -05:00
Josh Matthews
042f351f7d Bug 1154813 - Enable test_fetch_event.html on linux. r=nsm 2015-04-17 16:11:10 -04:00
Ehsan Akhgari
eb49af05d5 Bug 1112469 follow-up: Disable the test everywhere for now since it seems that bug 1151974 hits more than just Windows
Landed on a CLOSED TREE
2015-04-17 15:12:11 -04:00
Ehsan Akhgari
c4500895b2 Bug 1112469 - Part 5: Actually test the code path that handles the idle-daily message; r=nsm
This is much better than testing just the
nsIServiceWorkerManager::UpdateAllRegistrations API.
2015-04-17 14:06:18 -04:00
Ehsan Akhgari
4dd6b5c6e5 Bug 1112469 - Part 4: Disable periodic updates of service workers when running tests; r=nsm
This is meant to avoid random issues with Gecko suddenly kicking off the
periodic updates in the middle of our test runs.  This uses a hidden pref
intentionally since nobody should be able to discover this pref by going
to about:config.
2015-04-17 14:06:02 -04:00
Ehsan Akhgari
110c047279 Bug 1112469 - Part 3: Add a unit test for ensuring that the nsIServiceWorkerManager.updateAllRegistrations() API works correctly; r=nsm 2015-04-17 14:05:05 -04:00
Ehsan Akhgari
0e17837a2f Bug 1112469 - Part 2: Update the service workers in the parent and all child processes every day; r=nsm 2015-04-17 14:01:21 -04:00
Ehsan Akhgari
12b9e4e3cd Bug 1112469 - Part 1: Implement an XPCOM service responsible to trigger daily updates of service workers; r=nsm 2015-04-17 13:59:49 -04:00