Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | |
michael@0 | 3 | <!-- |
michael@0 | 4 | Any copyright is dedicated to the Public Domain. |
michael@0 | 5 | http://creativecommons.org/licenses/publicdomain/ |
michael@0 | 6 | --> |
michael@0 | 7 | |
michael@0 | 8 | <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
michael@0 | 9 | <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" |
michael@0 | 10 | type="text/css"?> |
michael@0 | 11 | |
michael@0 | 12 | <?xml-stylesheet href="chrome://browser/content/places/places.css"?> |
michael@0 | 13 | <?xml-stylesheet href="chrome://browser/skin/places/places.css"?> |
michael@0 | 14 | <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?> |
michael@0 | 15 | |
michael@0 | 16 | <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
michael@0 | 17 | title="549192: History view not updated after deleting entry" |
michael@0 | 18 | onload="runTest();"> |
michael@0 | 19 | |
michael@0 | 20 | <script type="application/javascript" |
michael@0 | 21 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> |
michael@0 | 22 | <script type="application/javascript" src="head.js" /> |
michael@0 | 23 | |
michael@0 | 24 | <body xmlns="http://www.w3.org/1999/xhtml" /> |
michael@0 | 25 | |
michael@0 | 26 | <tree id="tree" |
michael@0 | 27 | type="places" |
michael@0 | 28 | flex="1"> |
michael@0 | 29 | <treecols> |
michael@0 | 30 | <treecol label="Title" id="title" anonid="title" primary="true" ordinal="1" flex="1"/> |
michael@0 | 31 | </treecols> |
michael@0 | 32 | <treechildren flex="1"/> |
michael@0 | 33 | </tree> |
michael@0 | 34 | |
michael@0 | 35 | <script type="application/javascript"><![CDATA[ |
michael@0 | 36 | /** |
michael@0 | 37 | * Ensure that selectItems doesn't recurse infinitely in nested trees. |
michael@0 | 38 | */ |
michael@0 | 39 | |
michael@0 | 40 | function runTest() { |
michael@0 | 41 | PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId, |
michael@0 | 42 | NetUtil.newURI("place:folder=UNFILED_BOOKMARKS"), |
michael@0 | 43 | PlacesUtils.bookmarks.DEFAULT_INDEX, |
michael@0 | 44 | "shortcut"); |
michael@0 | 45 | PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId, |
michael@0 | 46 | NetUtil.newURI("place:folder=UNFILED_BOOKMARKS&maxResults=10"), |
michael@0 | 47 | PlacesUtils.bookmarks.DEFAULT_INDEX, |
michael@0 | 48 | "query"); |
michael@0 | 49 | let folderId = PlacesUtils.bookmarks.createFolder(PlacesUtils.unfiledBookmarksFolderId, |
michael@0 | 50 | "folder", |
michael@0 | 51 | PlacesUtils.bookmarks.DEFAULT_INDEX); |
michael@0 | 52 | let itemId = PlacesUtils.bookmarks.insertBookmark(folderId, |
michael@0 | 53 | NetUtil.newURI("http://www.mozilla.org/"), |
michael@0 | 54 | PlacesUtils.bookmarks.DEFAULT_INDEX, |
michael@0 | 55 | "bookmark"); |
michael@0 | 56 | // Setup the places tree contents. |
michael@0 | 57 | var tree = document.getElementById("tree"); |
michael@0 | 58 | tree.place = "place:folder=UNFILED_BOOKMARKS"; |
michael@0 | 59 | |
michael@0 | 60 | // Select the last bookmark. |
michael@0 | 61 | tree.selectItems([itemId]); |
michael@0 | 62 | is (tree.selectedNode.itemId, itemId, "The right node was selected"); |
michael@0 | 63 | } |
michael@0 | 64 | |
michael@0 | 65 | ]]></script> |
michael@0 | 66 | </window> |