diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-25 15:07:00 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:55:19 +0200 |
commit | eb70e6e3d0bff11c25f14b1196025791bf2308fb (patch) | |
tree | 5ef4ce17db83c74d7b05ec12c8f59e095a6dd5bd /toolkit/components/places/tests/chrome/test_341972b.xul | |
parent | 32ead795290b3399d56b4708fc75b77d296f6a1a (diff) | |
download | UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.gz UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.lz UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.xz UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.zip |
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/components/places/tests/chrome/test_341972b.xul')
-rw-r--r-- | toolkit/components/places/tests/chrome/test_341972b.xul | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/toolkit/components/places/tests/chrome/test_341972b.xul b/toolkit/components/places/tests/chrome/test_341972b.xul deleted file mode 100644 index 86cdc75f3..000000000 --- a/toolkit/components/places/tests/chrome/test_341972b.xul +++ /dev/null @@ -1,84 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet href="chrome://global/skin" type="text/css"?> -<?xml-stylesheet - href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?> -<window title="Update Livemark SiteURI, null to start" - xmlns:html="http://www.w3.org/1999/xhtml" - xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" - onload="runTest()"> - <script type="application/javascript" - src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> - - <body xmlns="http://www.w3.org/1999/xhtml" /> - -<script type="application/javascript"> -<![CDATA[ -/* - Test updating livemark siteURI to the value from the feed, when it's null - */ -SimpleTest.waitForExplicitFinish(); - -var Cc = Components.classes; -var Ci = Components.interfaces; -var Cr = Components.results; - -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); -Components.utils.import("resource://gre/modules/NetUtil.jsm"); -Components.utils.import("resource://gre/modules/PlacesUtils.jsm"); - -function runTest() { - const FEEDSPEC = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/sample_feed.atom"; - const FEEDSITESPEC = "http://example.org/"; - - PlacesUtils.livemarks.addLivemark( - { title: "foo" - , parentGuid: PlacesUtils.bookmarks.toolbarGuid - , feedURI: NetUtil.newURI(FEEDSPEC) - }) - .then(function (aLivemark) { - is(aLivemark.siteURI, null, "Has null livemark site URI"); - - waitForLivemarkLoad(aLivemark, function (aLivemark) { - is(aLivemark.siteURI.spec, FEEDSITESPEC, - "livemark site URI set to value in feed"); - - PlacesUtils.livemarks.removeLivemark(aLivemark).then(() => { - SimpleTest.finish(); - }); - }); - }, function () { - is(true, false, "Should not fail adding a livemark"); - } - ); -} - -function waitForLivemarkLoad(aLivemark, aCallback) { - // Don't need a real node here. - let node = {}; - let resultObserver = { - nodeInserted: function() {}, - nodeRemoved: function() {}, - nodeAnnotationChanged: function() {}, - nodeTitleChanged: function() {}, - nodeHistoryDetailsChanged: function() {}, - nodeMoved: function() {}, - ontainerStateChanged: function () {}, - sortingChanged: function() {}, - batching: function() {}, - invalidateContainer: function(node) { - isnot(aLivemark.status, Ci.mozILivemark.STATUS_FAILED, - "Loading livemark should success"); - if (aLivemark.status == Ci.mozILivemark.STATUS_READY) { - aLivemark.unregisterForUpdates(node, resultObserver); - aCallback(aLivemark); - } - } - }; - aLivemark.registerForUpdates(node, resultObserver); - aLivemark.reload(); -} - -]]> -</script> - -</window> |