Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8046)

Unified Diff: chrome/test/data/extensions/api_test/bookmarks/test.js

Issue 10831012: Fixed ExtensionApiTest.Bookmarks and enabled it again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed bug comment Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/bookmarks/bookmark_extension_apitest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/bookmarks/test.js
diff --git a/chrome/test/data/extensions/api_test/bookmarks/test.js b/chrome/test/data/extensions/api_test/bookmarks/test.js
index cc7f6b896e06d2c90ab975c5b91d721fea0b38a1..7ee9b84a1db715f4b041b50b18b158e2512d51a5 100644
--- a/chrome/test/data/extensions/api_test/bookmarks/test.js
+++ b/chrome/test/data/extensions/api_test/bookmarks/test.js
@@ -67,7 +67,7 @@ function compareTrees(left, right, verbose) {
return true;
}
if (left == null || right == null)
- return left + " !+ " + right;
+ return left + " != " + right;
if (left.length != right.length)
return "count mismatch: " + left.length + " != " + right.length;
for (var i = 0; i < left.length; i++) {
@@ -177,6 +177,7 @@ chrome.test.runTests([
// Make sure the parentId defaults to the Other Bookmarks folder.
chrome.test.assertEq(expected[0].children[1].id, created.parentId);
chrome.test.assertTrue(compareNode(node, created));
+ expected[0].children[1].children.push(node);
});
chrome.bookmarks.create(node, pass(function(results) {
node.id = results.id; // since we couldn't know this going in
@@ -276,12 +277,11 @@ chrome.test.runTests([
pass(function(results) {
chrome.test.assertEq(results.parentId, other.id);
folder.parentId = results.parentId;
+ folder.index = results.index;
var folder2 = expected[0].children[0].children.pop();
- folder2.parentId = other.parentId;
- folder2.index = 0;
+ chrome.test.assertEq(folder2.id, folder.id);
expected[0].children[1].children.push(folder2);
-
verifyTreeIsExpected(pass());
}));
},
@@ -361,9 +361,9 @@ chrome.test.runTests([
// Update expected to match.
// We removed node1, which means that the index of the other two nodes
// changes as well.
- expected[0].children[1].children[0].children.shift();
- expected[0].children[1].children[0].children[0].index = 0;
- expected[0].children[1].children[0].children[1].index = 1;
+ expected[0].children[1].children[1].children.shift();
+ expected[0].children[1].children[1].children[0].index = 0;
+ expected[0].children[1].children[1].children[1].index = 1;
verifyTreeIsExpected(pass());
}));
@@ -371,7 +371,7 @@ chrome.test.runTests([
function removeTree() {
var parentId = node2.parentId;
- var folder = expected[0].children[1].children[0];
+ var folder = expected[0].children[1].children[1];
chrome.test.listenOnce(chrome.bookmarks.onRemoved,
function(id, removeInfo) {
chrome.test.assertEq(id, folder.id);
@@ -380,8 +380,7 @@ chrome.test.runTests([
});
chrome.bookmarks.removeTree(parentId, pass(function(){
// Update expected to match.
- expected[0].children[1].children.shift();
-
+ expected[0].children[1].children.pop();
verifyTreeIsExpected(pass());
}));
},
@@ -436,9 +435,8 @@ chrome.test.runTests([
chrome.bookmarks.getChildren(id, pass(function(children) {
children.forEach(function(child, i) {
chrome.bookmarks.removeTree(child.id, pass(function() {}));
-
// When we have removed the last child we can continue.
- if (i == children.length - 1)
+ if (id == "2" && i == children.length - 1)
afterRemove();
});
}));
« no previous file with comments | « chrome/browser/bookmarks/bookmark_extension_apitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698