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

Unified Diff: chrome/test/data/extensions/api_test/bookmark_manager/standard/test.js

Issue 606923002: Protect against setting meta info on unmodifiable nodes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 3 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/extensions/api/bookmark_manager_private/bookmark_manager_private_api.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/bookmark_manager/standard/test.js
diff --git a/chrome/test/data/extensions/api_test/bookmark_manager/standard/test.js b/chrome/test/data/extensions/api_test/bookmark_manager/standard/test.js
index e09929ebc35af5637cd32dd8d833e86fb9368b0a..f424eafe979e6a1edad2f5d7d33608d606af2f2a 100644
--- a/chrome/test/data/extensions/api_test/bookmark_manager/standard/test.js
+++ b/chrome/test/data/extensions/api_test/bookmark_manager/standard/test.js
@@ -341,6 +341,16 @@ var tests = [
}));
},
+ function setMetaInfoUnmodifiable() {
+ bookmarks.getTree(pass(function(nodes) {
+ var unmodifiableFolder = nodes[0].children[0];
+ bookmarkManager.setMetaInfo(unmodifiableFolder.id, 'meta', 'foo', fail(
Jeffrey Yasskin 2014/09/26 01:19:19 I saw two checks in the real code, for !CanBeModif
Rune Fevang 2014/09/26 20:44:06 Done.
+ "Can't modify the root bookmark folders."));
+ bookmarkManager.updateMetaInfo(unmodifiableFolder.id, {a: 'a', b: 'b'},
+ fail("Can't modify the root bookmark folders."));
+ }));
+ },
+
function updateMetaInfo() {
bookmarkManager.getMetaInfo(nodeB.id, pass(function(result){
assertEq({}, result);
« no previous file with comments | « chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698