Commit Graph

58 Commits

Author SHA1 Message Date
Nigel Babu
47340db7f0 Backed out changeset 96c20db25b6b (bug 1144214) for Android M4 bustage CLOSED TREE 2015-03-18 11:48:41 +05:30
Ehsan Akhgari
e73318de31 Bug 1144236 - Add tests for the ignoreMethod match mode in DOM cache; r=bkelly 2015-03-17 23:56:32 -04:00
Ehsan Akhgari
b48d53e850 Bug 1144214 - Fix DeleteOrphanedBodyAction so that it doesn't orphan cache files if the action is canceled; r=bkelly 2015-03-17 23:56:31 -04:00
Nikhil Marathe
011987e024 Bug 1143155 - Filtered response stores internal response and allows access to headers. r=bkelly
--HG--
extra : rebase_source : 3fcc1d7de76e679f5055382af1159f004dd5372c
2015-03-17 08:47:01 -07:00
Ehsan Akhgari
babb2a95d5 Bug 1143222 - Avoid dumping out extremely long response bodies to the mochitest log, and re-enable the newly added DOM cache tests to run both in seqential and parallel modes; r=bkelly
The test timeouts here are some form of bug 1141256, which causes the service
worker spawned in the parallel mode of the tests to never start up.  It turns
out that avoiding sending this huge message to the mochitest logger avoids the
issue on the infrastructure, so let's re-enable these tests.  Bug 1141256 still
needs to be investigated.
2015-03-17 16:51:57 -04:00
Daniel Holbert
082fd9cd7f Bug 1142841: Convert all nsRefPtr<nsIRunnable> to nsCOMPtr<nsIRunnable>. r=ehsan
This patch was generated by a script.  Here's the source of the script for
future reference:

find . \( -iname "*.cpp" -o -iname "*.h" \) | \
  xargs -n 1 sed -i "s/nsRefPtr<nsIRunnable>/nsCOMPtr<nsIRunnable>/g"
2015-03-17 09:29:17 -07:00
Ehsan Akhgari
eaf970dc6a Bug 1143959 - Set the journal mode and foreign key pragmas for all DBActions; r=bkelly
Before this patch, we would only set these pragmas as part of CreateSchema
which runs in SetupAction.  This meant that the connection used to perform
other DBActions would not have had these pragmas applied.  As a result,
sqlite would not honor foreign keys on such connections, so the cascade
delete rules responsible for deleting rows from request_headers and
response_headers would not get executed when DBSchema::CachePut deleted the
old entry before adding a new one.

The test in the patch demonstrates how this could result in an observable
breakage.  Before this patch, the response headers stored in the cache for
the overwritten entry would reflect both `Mirrored: `foo' and `Mirrored: bar'
headers, which means that attempting to get this header on the cached
response would return the first entry, `foo'.
2015-03-17 08:18:28 -04:00
Ehsan Akhgari
23214cf141 Bug 1143833 - Add tests for the ignoreSearch match mode in DOM cache; r=bkelly 2015-03-16 17:11:05 -04:00
Ehsan Akhgari
3355cc8ff3 Bug 1143820 - Add tests to ensure that the URL fragments are correctly ignored by the DOM Cache API; r=bkelly 2015-03-16 17:08:09 -04:00
Ehsan Akhgari
56026081c7 Bug 1143813 - Add tests for attempting to store a non-GET request in the DOM Cache; r=bkelly 2015-03-16 17:03:45 -04:00
Ehsan Akhgari
791ff66ebf Bug 1143511 - Correct the usages of .catch() in DOM cache tests; r=bkelly
These tests used .catch() incorrectly, in a way that did not actually
guarantee that the promise is rejected, so in 3 cases the promise
resolved to known failure values (undefined or an empty array) and
this was not being caught as a test failure.

This patch fixes those three places, and also rewrites the .catch()
usage in another case to guarantee that the promise is indeed rejected.
2015-03-16 16:53:10 -04:00
Ehsan Akhgari
0046a6d6ef Bug 1143219 - Add tests for passing an unknown request to match and matchAll; r=bkelly 2015-03-16 16:46:49 -04:00
Ehsan Akhgari
0ee6b70264 Bug 1143193 - Run the tests for match and matchAll on both Request objects and string URLs; r=bkelly 2015-03-16 16:29:22 -04:00
Ryan VanderMeulen
ba908a867f Backed out changeset 734e81bff9f3 (bug 1110487) for intermittent e10s cache test crashes.
CLOSED TREE
2015-03-16 13:51:33 -04:00
Ben Kelly
30333a7a7d Bug 1110487 P2 Implement the nsIOfflineStorage interface in Cache. r=janv,ehsan 2015-03-16 07:10:36 -07:00
Ben Kelly
92143814c0 Bug 1110487 P1 Fix some non-unified bustage before adding new code. r=ehsan 2015-03-16 07:10:36 -07:00
Ehsan Akhgari
a95ed2c938 Bug 1143222 - Re-enable the newly added DOM cache test in sequential mode only for now 2015-03-15 17:53:50 -04:00
Ehsan Akhgari
ab42a2ec61 Bug 1143222 - Disable the newly added DOM cache tests for now because of intermittent failures
Landed on a CLOSED TREE
2015-03-13 19:23:34 -04:00
Ehsan Akhgari
47a098b474 Bug 1142790 - Add a test for passing Request objects to DOM cache matchAll method; r=bkelly 2015-03-13 19:21:16 -04:00
Ehsan Akhgari
acab4ce118 Bug 1142269 - Auto-vacuum the DOM Cache database; r=bkelly
It's easiest if we use auto_vaccum for now.  In the future if this
proves to be insufficient we can look into more sophisticated
vacuuming strategies.
2015-03-13 19:21:13 -04:00
Wes Kocher
d38aa64d52 Backed out changeset b8d2fd1bb7f5 (bug 1142269) for mochitest-1 timeouts CLOSED TREE 2015-03-13 16:02:18 -07:00
Wes Kocher
fe556f9355 Backed out changeset 1bd38b652695 (bug 1142790) for mochitest-1 timeouts CLOSED TREE 2015-03-13 16:02:08 -07:00
Ehsan Akhgari
230f9e920c Bug 1142790 - Add a test for passing Request objects to DOM cache matchAll method; r=bkelly 2015-03-13 14:40:33 -04:00
Ehsan Akhgari
b6a46d94b1 Bug 1142269 - Auto-vacuum the DOM Cache database; r=bkelly
It's easiest if we use auto_vaccum for now.  In the future if this
proves to be insufficient we can look into more sophisticated
vacuuming strategies.
2015-03-13 14:40:27 -04:00
Ehsan Akhgari
d5b78213fd Bug 1133763 - Part 4: Store the response's security info in the cache database; r=bkelly 2015-03-13 14:37:19 -04:00
Ehsan Akhgari
d5840b488d Bug 1133763 - Part 3: Wipe out the cache directory when detecting a change in the DB schema; r=bkelly 2015-03-13 14:37:18 -04:00
Ehsan Akhgari
58b1ce9c4b Bug 1133763 - Part 2: Transfer the security info associated with an InternalResponse across the IPC layer; r=bkelly 2015-03-13 14:37:16 -04:00
Ehsan Akhgari
eed5a8dba4 Bug 1142772 - Interleave the DOM Cache tests run through the mini-framework; r=bkelly
Here are the changes needed to achieve this:

* We tag each message posted to the framework with a context argument.
  context can be one of "Window", "Worker" or "ServiceWorker".  In the
  places where we handle messages, we only handle the ones corresponding
  to the context that we expect.
* We use Promise.all in order to interleave the execution of the tests.
  This has the nice property of actually getting the tests run
  simultaneously on multi-core machines.
* For ease of debugging test failures, we print the context from which
  each test message is coming from.
* In order for the tests that are run in parallel to not step on each
  other's toes, we introduce a global `context' variable that the test
  script can use to create names that do not clash with concurrent
  test runs.  For example, instead of `caches.open("foo")', one must now
  use: `caches.open("foo" + context)'.
* The existing tests are modified based on the above.
* When running the tests in parallel, the service worker may end up
  controlling both frame.html and message_receiver.html.  The hunk at
  the end of worker_wrapper.js is intended to ensure that we will
  always be communicating with message_receiver.html.
* An order argument has been added to runTests which can be set to
  "sequential" in order to run the tests in different contexts in
  parallel.  If the argument is omitted, the default is "parallel".
2015-03-13 14:32:02 -04:00
Ehsan Akhgari
43c73c2bcf Bug 1142333 - Add a test for passing Request objects to DOM cache match methods; r=bkelly 2015-03-13 14:28:24 -04:00
Ehsan Akhgari
3d44a57364 Bug 1142195 - Remove some unused class declarations in the DOM Cache code; r=bkelly 2015-03-11 16:46:15 -04:00
Ehsan Akhgari
09a624cdf5 Bug 1140658 - Part 8: Disable the service worker part of these tests on b2g while bug 1137683 gets fixed; r=bkelly 2015-03-11 16:46:04 -04:00
Ben Kelly
a31b9f226c Bug 1140658 - Part 7: Close underlying file stream in ReadStream before reporting closed; r=ehsan 2015-03-11 16:45:35 -04:00
Ehsan Akhgari
9a622be5a7 Bug 1140658 - Part 6: Randomize the URL of the ServiceWorker script in order to work around bug 1141256 for now 2015-03-11 16:45:08 -04:00
Ehsan Akhgari
233f23428c Bug 1140658 - Part 5: Remove test_cache_quick_close.html because it makes no sense after bug 1131353; r=bkelly 2015-03-11 16:45:06 -04:00
Ehsan Akhgari
3933a8a97c Bug 1140658 - Part 4: Port test_cache_add.html to the new mini-framework; r=bkelly 2015-03-11 16:45:05 -04:00
Ehsan Akhgari
9e4efd1206 Bug 1140658 - Part 3: Port test_cache.html to the new mini-framework; r=bkelly 2015-03-11 16:45:03 -04:00
Ehsan Akhgari
fc378c5b91 Bug 1140658 - Part 2: Merge test_cache.js and test_cache_frame.html; r=bkelly 2015-03-11 16:45:01 -04:00
Ehsan Akhgari
8ceef26b0c Bug 1140658 - Part 1: Create a mini-framework for running tests in the worker, service worker and window contexts; r=bkelly 2015-03-11 16:45:00 -04:00
Carsten "Tomcat" Book
04343cce81 Backed out changeset c96b6474bdac (bug 1140658) for m1 crashes 2015-03-10 09:01:47 +01:00
Carsten "Tomcat" Book
6612a28f54 Backed out changeset 8827f51084f1 (bug 1140658) 2015-03-10 09:01:10 +01:00
Carsten "Tomcat" Book
0b428fa812 Backed out changeset 0438058b908a (bug 1140658) 2015-03-10 09:01:08 +01:00
Carsten "Tomcat" Book
7d7287fd90 Backed out changeset 2e62e8ce8c3e (bug 1140658) 2015-03-10 09:01:07 +01:00
Carsten "Tomcat" Book
223c72260c Backed out changeset f646f28b05d6 (bug 1140658) 2015-03-10 09:01:05 +01:00
Carsten "Tomcat" Book
901f5a7991 Backed out changeset 7d91550919d2 (bug 1140658) 2015-03-10 09:01:00 +01:00
Ehsan Akhgari
962dac81fb Bug 1140658 - Part 6: Randomize the URL of the ServiceWorker script in order to work around bug 1141256 for now 2015-03-09 22:03:27 -04:00
Ehsan Akhgari
13d5aa382c Bug 1140658 - Part 5: Remove test_cache_quick_close.html because it makes no sense after bug 1131353; r=bkelly 2015-03-09 22:03:27 -04:00
Ehsan Akhgari
9312cb686c Bug 1140658 - Part 4: Port test_cache_add.html to the new mini-framework; r=bkelly 2015-03-09 22:03:26 -04:00
Ehsan Akhgari
6c0dca71aa Bug 1140658 - Part 3: Port test_cache.html to the new mini-framework; r=bkelly 2015-03-09 22:03:26 -04:00
Ehsan Akhgari
59ef13fb44 Bug 1140658 - Part 2: Merge test_cache.js and test_cache_frame.html; r=bkelly 2015-03-09 22:03:25 -04:00
Ehsan Akhgari
af02a959d9 Bug 1140658 - Part 1: Create a mini-framework for running tests in the worker, service worker and window contexts; r=bkelly 2015-03-09 22:03:25 -04:00