diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-25 15:07:00 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-25 15:07:00 -0500 |
commit | 0ddd00f1959c78ce37c14fef3c83401408fca3bf (patch) | |
tree | d408e02767c86cf8aac3acbb86722b03c77ede6f /toolkit/components/places/tests/history/test_updatePlaces_sameUri_titleChanged.js | |
parent | 20f0905b33cbb18d1caa80c55e2f552c2e18957b (diff) | |
download | UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.gz UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.lz UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.xz UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.zip |
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/components/places/tests/history/test_updatePlaces_sameUri_titleChanged.js')
-rw-r--r-- | toolkit/components/places/tests/history/test_updatePlaces_sameUri_titleChanged.js | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/toolkit/components/places/tests/history/test_updatePlaces_sameUri_titleChanged.js b/toolkit/components/places/tests/history/test_updatePlaces_sameUri_titleChanged.js deleted file mode 100644 index 832df9d9a..000000000 --- a/toolkit/components/places/tests/history/test_updatePlaces_sameUri_titleChanged.js +++ /dev/null @@ -1,52 +0,0 @@ -// Test that repeated additions of the same URI through updatePlaces, properly -// update from_visit and notify titleChanged. - -add_task(function* test() { - let uri = "http://test.com/"; - - let promiseTitleChangedNotifications = new Promise(resolve => { - let historyObserver = { - _count: 0, - __proto__: NavHistoryObserver.prototype, - onTitleChanged(aURI, aTitle, aGUID) { - Assert.equal(aURI.spec, uri, "Should notify the proper url"); - if (++this._count == 2) { - PlacesUtils.history.removeObserver(historyObserver); - resolve(); - } - } - }; - PlacesUtils.history.addObserver(historyObserver, false); - }); - - // This repeats the url on purpose, don't merge it into a single place entry. - yield PlacesTestUtils.addVisits([ - { uri, title: "test" }, - { uri, referrer: uri, title: "test2" }, - ]); - - let options = PlacesUtils.history.getNewQueryOptions(); - let query = PlacesUtils.history.getNewQuery(); - query.uri = NetUtil.newURI(uri); - options.resultType = options.RESULTS_AS_VISIT; - let root = PlacesUtils.history.executeQuery(query, options).root; - root.containerOpen = true; - - Assert.equal(root.childCount, 2); - - let child = root.getChild(0); - Assert.equal(child.visitType, TRANSITION_LINK, "Visit type should be TRANSITION_LINK"); - Assert.equal(child.visitId, 1, "Visit ID should be 1"); - Assert.equal(child.fromVisitId, -1, "Should have no referrer visit ID"); - Assert.equal(child.title, "test2", "Should have the correct title"); - - child = root.getChild(1); - Assert.equal(child.visitType, TRANSITION_LINK, "Visit type should be TRANSITION_LINK"); - Assert.equal(child.visitId, 2, "Visit ID should be 2"); - Assert.equal(child.fromVisitId, 1, "First visit should be the referring visit"); - Assert.equal(child.title, "test2", "Should have the correct title"); - - root.containerOpen = false; - - yield promiseTitleChangedNotifications; -}); |