rem: query.setFolders([bmsvc.tagRoot], 1); 
add: query.setFolders([bmsvc.tagsFolder], 1); 
context: function run_test() {  var options = histsvc.getNewQueryOptions();  var query = histsvc.getNewQuery();  query.setFolders([bmsvc.tagRoot], 1);  var result = histsvc.executeQuery(query, options);  var tagRoot = result.root;  tagRoot.containerOpen = true;  do_check_eq(tagRoot.childCount, 0);  var uri1 = uri("http://foo.tld/");  var uri2 = uri("https://bar.tld/");  // this also tests that the multiple folders are not created for the same tag  tagssvc.tagURI(uri1, ["tag 1"]);  tagssvc.tagURI(uri2, ["tag 1"]);  do_check_eq(tagRoot.childCount, 1);  var tag1node = tagRoot.getChild(0)                        .QueryInterface(Ci.nsINavHistoryContainerResultNode);  do_check_eq(tag1node.title, "tag 1");  tag1node.containerOpen = true;  do_check_eq(tag1node.childCount, 2);  // Tagging the same url twice with the same tag should be a no-op  tagssvc.tagURI(uri1, ["tag 1"]);  do_check_eq(tag1node.childCount, 2);  // the former should be ignored.  do_check_eq(tagRoot.childCount, 1);  tagssvc.tagURI(uri1, ["tag 1", "tag 2"]);  do_check_eq(tagRoot.childCount, 2);  // test getTagsForURI  var uri1tags = tagssvc.getTagsForURI(uri1, {});  do_check_eq(uri1tags.length, 2);  do_check_eq(uri1tags[0], "tag 1");  do_check_eq(uri1tags[1], "tag 2");  var uri2tags = tagssvc.getTagsForURI(uri2, {});  do_check_eq(uri2tags.length, 1);  do_check_eq(uri2tags[0], "tag 1");  // test getURIsForTag  var tag1uris = tagssvc.getURIsForTag("tag 1");  do_check_eq(tag1uris.length, 2);  do_check_true(tag1uris[0].equals(uri1));  do_check_true(tag1uris[1].equals(uri2));  // test allTags attribute  var allTags = tagssvc.allTags;  do_check_eq(allTags.length, 2);  do_check_eq(allTags[0], "tag 1");  do_check_eq(allTags[1], "tag 2");  // test untagging  tagssvc.untagURI(uri1, ["tag 1"]);  do_check_eq(tag1node.childCount, 1);  // removing the last uri from a tag should remove the tag-container  tagssvc.untagURI(uri2, ["tag 1"]);  do_check_eq(tagRoot.childCount, 1);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/515ad5f12b663f1789d0d62c6a551f101a365824/test_tagging.js/buggy/toolkit/components/places/tests/unit/test_tagging.js