Closed
Bug 638123
Opened 14 years ago
Closed 14 years ago
Test for bug 637957
Categories
(Core :: SQLite and Embedded Database Bindings, defect)
Core
SQLite and Embedded Database Bindings
Tracking
()
RESOLVED
FIXED
mozilla6
People
(Reporter: mak, Assigned: mak)
References
Details
(Whiteboard: [fixed-in-places])
Attachments
(1 file, 1 obsolete file)
|
5.42 KB,
patch
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #637957 +++
Splitting the test from the bug, to allow the fix to land, the test still needs a better review and some polish once Shawn is back, we can land it in RC phase as well.
Will attach a new patch shortly.
| Assignee | ||
Comment 1•14 years ago
|
||
Attachment #516310 -
Flags: review?(sdwilsh)
Comment 2•14 years ago
|
||
Comment on attachment 516310 [details] [diff] [review]
patch v1.0
>+++ b/storage/test/test_async_callbacks_with_spun_event_loops.cpp
>+void
>+test_SpinEventsLoopInHandleResult()
>+{
>+ nsCOMPtr<mozIStorageConnection> db(getMemoryDatabase());
>+
>+ // Create a test table and populate it.
>+ nsCOMPtr<mozIStorageAsyncStatement> stmt;
>+ db->CreateAsyncStatement(NS_LITERAL_CSTRING(
>+ "CREATE TABLE test (id INTEGER PRIMARY KEY)"
>+ ), getter_AddRefs(stmt));
>+ blocking_async_execute(stmt);
>+ stmt->Finalize();
>+
>+ db->CreateAsyncStatement(NS_LITERAL_CSTRING(
>+ "INSERT INTO test (id) VALUES (?)"
>+ ), getter_AddRefs(stmt));
>+ for (PRInt32 i = 0; i < 30; ++i) {
>+ stmt->BindInt32Parameter(0, i);
>+ blocking_async_execute(stmt);
>+ }
>+ stmt->Finalize();
Just do these synchronously so we don't add more variables to the test.
>+void
>+test_SpinEventsLoopInHandleError()
>+{
>+ nsCOMPtr<mozIStorageConnection> db(getMemoryDatabase());
>+
>+ // Create a test table and populate it.
>+ nsCOMPtr<mozIStorageAsyncStatement> stmt;
>+ db->CreateAsyncStatement(NS_LITERAL_CSTRING(
>+ "CREATE TABLE test (id INTEGER PRIMARY KEY)"
>+ ), getter_AddRefs(stmt));
>+ blocking_async_execute(stmt);
>+ stmt->Finalize();
>+
>+ db->CreateAsyncStatement(NS_LITERAL_CSTRING(
>+ "INSERT INTO test (id) VALUES (1)"
>+ ), getter_AddRefs(stmt));
>+ blocking_async_execute(stmt);
>+ stmt->Finalize();
ditto
r=sdwilsh
Attachment #516310 -
Flags: review?(sdwilsh) → review+
| Assignee | ||
Comment 3•14 years ago
|
||
addressed comments.
Attachment #516310 -
Attachment is obsolete: true
| Assignee | ||
Comment 4•14 years ago
|
||
Flags: in-testsuite+
Whiteboard: [fixed-in-places]
| Assignee | ||
Comment 5•14 years ago
|
||
followup to remove a trailing semicolon that was causing the build to fail on Linux.
http://hg.mozilla.org/projects/places/rev/5f97ac170bfa
| Assignee | ||
Comment 6•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/18d8734519e7
http://hg.mozilla.org/mozilla-central/rev/5f97ac170bfa
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
Updated•1 year ago
|
Product: Toolkit → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•