Closed Bug 406937 Opened 18 years ago Closed 17 years ago

Fix places tests using milliseconds for APIs that require microseconds

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dietrich, Assigned: ondrej)

Details

Attachments

(1 file)

Fixed this in expiration for bug 402880. Need to check for other instances of this.
Attached patch Fix testsSplinter Review
I have lost some time today, until I have found that the time is incorrectly used in the tests when I was writing a new test for bug 385245. The fix is very easy, so here it comes, all the tests PASS ok before and even after the patch.
Assignee: nobody → ondrej
Status: NEW → ASSIGNED
Attachment #298254 - Flags: review?(dietrich)
Comment on attachment 298254 [details] [diff] [review] Fix tests >Index: toolkit/components/places/tests/unit/test_expiration.js >=================================================================== >RCS file: /cvsroot/mozilla/toolkit/components/places/tests/unit/test_expiration.js,v >retrieving revision 1.15 >diff -u -1 -2 -p -d -a -r1.15 test_expiration.js >--- toolkit/components/places/tests/unit/test_expiration.js 21 Dec 2007 19:37:18 -0000 1.15 >+++ toolkit/components/places/tests/unit/test_expiration.js 21 Jan 2008 13:44:09 -0000 >@@ -130,27 +130,27 @@ function run_test() { > do_check_eq(annosvc.getPageAnnotation(testURI, testAnnoName + "Never"), testAnnoVal); > annosvc.removePageAnnotation(testURI, testAnnoName + "Never"); > > /* > test that nsIBrowserHistory.removeAllPages does remove expirable annotations > but doesn't remove bookmarks or EXPIRE_NEVER annotations. > */ > var removeAllTestURI = uri("http://removeallpages.com"); > var removeAllTestURINever = uri("http://removeallpagesnever.com"); > histsvc.addVisit(removeAllTestURI, Date.now() * 1000, null, histsvc.TRANSITION_TYPED, false, 0); > var bmURI = uri("http://bookmarked"); > bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, bmURI, bmsvc.DEFAULT_INDEX, "foo"); >- //bhist.addPageWithDetails(placeURI, "place uri", Date.now()); >+ //bhist.addPageWithDetails(placeURI, "place uri", Date.now() * 1000); > var placeURI = uri("place:folder=23"); looks like this could be removed altogether. r=me, thanks!
Attachment #298254 - Flags: review?(dietrich) → review+
Comment on attachment 298254 [details] [diff] [review] Fix tests drivers: fixing incorrect values in various places tests. (do we need driver approval for test-only patches?)
Attachment #298254 - Flags: approval1.9?
Comment on attachment 298254 [details] [diff] [review] Fix tests Approval has never been required for tests.
Attachment #298254 - Flags: approval1.9?
Keywords: checkin-needed
Checking in toolkit/components/places/tests/bookmarks/test_bookmarks.js; /cvsroot/mozilla/toolkit/components/places/tests/bookmarks/test_bookmarks.js,v <-- test_bookmarks.js new revision: 1.40; previous revision: 1.39 done Checking in toolkit/components/places/tests/bookmarks/test_savedsearches.js; /cvsroot/mozilla/toolkit/components/places/tests/bookmarks/test_savedsearches.js,v <-- test_savedsearches.js new revision: 1.3; previous revision: 1.2 done Checking in toolkit/components/places/tests/unit/test_385397.js; /cvsroot/mozilla/toolkit/components/places/tests/unit/test_385397.js,v <-- test_385397.js new revision: 1.3; previous revision: 1.2 done Checking in toolkit/components/places/tests/unit/test_399266.js; /cvsroot/mozilla/toolkit/components/places/tests/unit/test_399266.js,v <-- test_399266.js new revision: 1.3; previous revision: 1.2 done Checking in toolkit/components/places/tests/unit/test_browserhistory.js; /cvsroot/mozilla/toolkit/components/places/tests/unit/test_browserhistory.js,v <-- test_browserhistory.js new revision: 1.3; previous revision: 1.2 done Checking in toolkit/components/places/tests/unit/test_expiration.js; /cvsroot/mozilla/toolkit/components/places/tests/unit/test_expiration.js,v <-- test_expiration.js new revision: 1.16; previous revision: 1.15 done Checking in toolkit/components/places/tests/unit/test_history.js; /cvsroot/mozilla/toolkit/components/places/tests/unit/test_history.js,v <-- test_history.js new revision: 1.9; previous revision: 1.8 done Checking in toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js; /cvsroot/mozilla/toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js,v <-- test_nsINavHistoryViewer.js new revision: 1.6; previous revision: 1.5 done Checking in toolkit/components/places/tests/unit/test_resolveNullBookmarkTitles.js; /cvsroot/mozilla/toolkit/components/places/tests/unit/test_resolveNullBookmarkTitles.js,v <-- test_resolveNullBookmarkTitles.js new revision: 1.4; previous revision: 1.3 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h". In Thunderbird 3.0b, you do that as follows: Tools | Message Filters Make sure the correct account is selected. Click "New" Conditions: Body contains places-to-b-and-h Change the action to "Delete Message". Select "Manually Run" from the dropdown at the top. Click OK. Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter. Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: