Closed Bug 638123 Opened 14 years ago Closed 14 years ago

Test for bug 637957

Categories

(Core :: SQLite and Embedded Database Bindings, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla6

People

(Reporter: mak, Assigned: mak)

References

Details

(Whiteboard: [fixed-in-places])

Attachments

(1 file, 1 obsolete file)

+++ 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.
Attached patch patch v1.0 (obsolete) — Splinter Review
Attachment #516310 - Flags: review?(sdwilsh)
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+
Attached patch patch v1.1Splinter Review
addressed comments.
Attachment #516310 - Attachment is obsolete: true
Flags: in-testsuite+
Whiteboard: [fixed-in-places]
followup to remove a trailing semicolon that was causing the build to fail on Linux. http://hg.mozilla.org/projects/places/rev/5f97ac170bfa
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
Product: Toolkit → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: