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 a7440919b16fe1ac4a1d11f752a994d0e597d28c..cc7f6b896e06d2c90ab975c5b91d721fea0b38a1 100644 |
--- a/chrome/test/data/extensions/api_test/bookmarks/test.js |
+++ b/chrome/test/data/extensions/api_test/bookmarks/test.js |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -168,6 +168,24 @@ chrome.test.runTests([ |
})); |
}, |
+ function createNoParentId() { |
+ var node = {title:"google", url:"http://www.google.com/"}; |
+ chrome.test.listenOnce(chrome.bookmarks.onCreated, function(id, created) { |
+ node.id = created.id; |
+ node.index = 0; |
+ chrome.test.assertEq(id, node.id); |
+ // 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)); |
+ }); |
+ chrome.bookmarks.create(node, pass(function(results) { |
+ node.id = results.id; // since we couldn't know this going in |
+ node.index = 0; |
+ chrome.test.assertTrue(compareNode(node, results), |
+ "created node != source"); |
+ })); |
+ }, |
+ |
function createInRoot() { |
const error = "Can't modify the root bookmark folders."; |
var node = {parentId:"0", title:"g404", url:"http://www.google.com/404"}; |