Make indexeddb mochitests run in fennec

RESOLVED FIXED in Firefox 14



DOM: Core & HTML
6 years ago
5 years ago


(Reporter: jdm, Assigned: Ben Turner (not reading bugmail, use the needinfo flag!))


Dependency tree / graph

Firefox Tracking Flags

(blocking-basecamp:-, firefox14 fixed, firefox15 fixed, blocking-fennec1.0 .N+, fennec+)


(Whiteboard: [qa-])


(1 attachment, 1 obsolete attachment)

Comment hidden (empty)

Comment 1

6 years ago
Created attachment 539045 [details] [diff] [review]
Fix indexeddb mochitests to run green in Fennec.
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Duplicate of this bug: 682349
Blocks: 666693


6 years ago
Blocks: 682389
A very serious regression (bug 715074) just arose because we're not running these tests.  Anything preventing this patch from landing?

Comment 4

6 years ago
How do I enable these tests on Fennec (in a patch for testing on the try server) ?
The tests should just work on native Fennec without this patch.  I have no idea why we're not running them.
if the tests run fine, please add them to the file.
jmaher tells me that there's no way to say "these tests work in native fennec but not xul fennec"
Depends on: 715862
hmm, it appears that android.json isn't supported yet in releng as per bug 695351.  

I filed bug 664029 to track this.
Why should they not run in xul fennec?
the tests failed there, I believe due to e10s issues with indexedDB and/or the tests.
If I recall correctly, we had something of a hacky remoting stopgap that should have worked.  If it doesn't, we need to fix it.  Will chat with bent/sicking.  There were longer-range plans for a better one but scheduling that is harder.  In this case, we should enable the tests.

But I don't remember correctly and there wasn't a hacky remoting stopgap, OK, makes sense to have them off.
IDL (allegedly) works in e10s, in a single process (I haven't actually tried it myself, wouldn't be surprised if we broke it).   The tests set preferences and permissions though, which is why they don't work.
That's IDB, of course.
We have support for cross-process friendly pref-setting now.  ISTR we did the same for permissions.  We really need to get these tests back on: one product (firefox/mobile/tablet) is currently shipping the code (apparently completely untested) and will continue to do so for the foreseeable future, and another product (b2g) will soon be shipping it.
Feel free to add directories to the testing/mochitest/android.json file and run them on try.  If they work land them and you have new tests turned on.

Comment 16

6 years ago

19870 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_deleteDatabase.html | indexedDB error, code 12
19884 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_deleteDatabase_interactions.html | indexedDB error, code 12
20184 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_file_os_delete.html | OS file deleted - got 864000, expected 76400

we need to fix that

Comment 17

6 years ago
ok, it seems sqlite3_quota_remove() doesn't work on mobile

Comment 18

6 years ago
we need this for unprefixing IDB

Comment 19

6 years ago
A SpecialPowers permissions API corresponding to pushPrefEnv was never created. We need to create that, then update the patch in this bug to use it.

Comment 20

6 years ago
At least, the previous comment is in regards to B2G's e10s model. I don't exactly understand what unprefixing IDB has to do with this patch.
We don't want to unprefix an API which is basically completely untested on mobile.


5 years ago
No longer blocks: 666693


5 years ago
Blocks: 666693
Jan: Does your comment 17 mean that IndexedDB doesn't currently work in Fennec? If so, can you file a separate bug on that?
Blocks: 726378
Whiteboard: [b2g:blocking-]
blocking-basecamp: --- → -
Whiteboard: [b2g:blocking-]
Comment on attachment 539045 [details] [diff] [review]
Fix indexeddb mochitests to run green in Fennec.

This should have landed as part of e10s stuff. Tests are still orange, but for a different reason.
Attachment #539045 - Attachment is obsolete: true
I have ran these recently without this patch and 3 tests timeout and the rest take a long time, before we turn these on, can we make a pass through to ensure these tests are running without major kinks to slow them down?
There are a few tests which run noticeably slower on android:

And there are a few that timeout:

These are all unrelated to the patch, but related to getting indexedDB tests running on android.
Blocks: 761125
Joel, when I pushed a patch to try which enabled the IDB tests, the test you mention as timing out straight up failed for me, with what looked as legitimate failures.

Bent is looking into this though.
Assignee: nobody → bent.mozilla
Created attachment 632030 [details] [diff] [review]

This was our fault. Fixed.
Attachment #632030 - Flags: review?(khuey)
Attachment #632030 - Flags: review?(khuey) → review-
Attachment #632030 - Flags: review- → review+

Comment 29

5 years ago
(In reply to ben turner [:bent] from comment #27)
> Created attachment 632030 [details] [diff] [review]
> Fix.
> This was our fault. Fixed.

So databases and stored files are not quota tracked on Android ?
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
when I run these locally on my tegra, I get this:
2269 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_deleteDatabase.html | indexedDB error, 'VersionError'
2270 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_deleteDatabase.html | an unexpected uncaught JS exception reported through window.onerror - [object Event] at undefined:undefined
2273 INFO TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_deleteDatabase_interactions.html | finished in a non-clean fashion (in /tests/dom/indexedDB/test/test_deleteDatabase.html)
2572 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_file_os_delete.html | OS file deleted - got 864000, expected 764000

I had mentioned these specific test files before.  this is while running with --test-path=dom/indexedDB/test.
Wait, they're passing on tinderbox right?
yes, they are passing, I double checked that.  I was just confused as I can't see them passing on my local tegra with a build from tinderbox.
This fixes a bug where we didn't properly clear databases in some racy conditions. It bit android tests in particular, but it can happen on any platform.
tracking-fennec: --- → ?
blocking-fennec1.0: --- → ?
Comment on attachment 632030 [details] [diff] [review]

[Approval Request Comment]
Bug caused by (feature/regressing bug #): IndexedDB (been around forever)
User impact if declined: Some databases may persist after pages request their deletion.
Testing completed (on m-c, etc.): Good tests on m-c, even fennec.
Risk to taking this patch (and alternatives if risky): This is a very small and very safe patch. I don't expect any risk, to be honest.
String or UUID changes made by this patch: None.
Attachment #632030 - Flags: approval-mozilla-beta?
Attachment #632030 - Flags: approval-mozilla-aurora?
tracking-fennec: ? → +
blocking-fennec1.0: ? → -
blocking-fennec1.0: - → .N+
Comment on attachment 632030 [details] [diff] [review]

Please land on mozilla-aurora and mozilla-beta, default branch (not 14.0 release branch).
Attachment #632030 - Flags: approval-mozilla-beta?
Attachment #632030 - Flags: approval-mozilla-beta+
Attachment #632030 - Flags: approval-mozilla-aurora?
Attachment #632030 - Flags: approval-mozilla-aurora+
status-firefox14: --- → fixed
status-firefox15: --- → fixed


5 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.