diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-25 20:47:52 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-25 20:47:52 +0000 |
commit | 4dad9ad838f6671fbd67e1c5292525e739e31983 (patch) | |
tree | 4d79fc17f12752cc221e0e40d16951677da71f92 /chrome/browser/bookmarks | |
parent | 2b3f0f59a6761a41e22007c2c3096e8e18517e08 (diff) | |
download | chromium_src-4dad9ad838f6671fbd67e1c5292525e739e31983.zip chromium_src-4dad9ad838f6671fbd67e1c5292525e739e31983.tar.gz chromium_src-4dad9ad838f6671fbd67e1c5292525e739e31983.tar.bz2 |
Many changes to DictionaryValues:
* Add support for keys with "." in them via new XXXWithoutPathExpansion() APIs.
* Use these APIs with all key iterator usage.
* SetXXX() calls cannot fail, so change them from bool to void.
* Change GetSize() to size() since it's cheap, and add empty().
Other:
* Use standard for loop format in more places (e.g. instead of while loops when they're really doing a for loop).
* Shorten a few bits of code.
BUG=567
TEST=none
Review URL: http://codereview.chromium.org/441008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_codec_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/bookmarks/bookmark_codec_unittest.cc b/chrome/browser/bookmarks/bookmark_codec_unittest.cc index 0ba16a7..8272270 100644 --- a/chrome/browser/bookmarks/bookmark_codec_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_codec_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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. @@ -202,14 +202,14 @@ TEST_F(BookmarkCodecTest, ChecksumManualEditTest) { GetBookmarksBarChildValue(value.get(), 0, &child1_value); std::wstring title; ASSERT_TRUE(child1_value->GetString(BookmarkCodec::kNameKey, &title)); - ASSERT_TRUE(child1_value->SetString(BookmarkCodec::kNameKey, title + L"1")); + child1_value->SetString(BookmarkCodec::kNameKey, title + L"1"); std::string dec_checksum; scoped_ptr<BookmarkModel> decoded_model1(DecodeHelper( *value.get(), enc_checksum, &dec_checksum, true)); // Undo the change and make sure the checksum is same as original. - ASSERT_TRUE(child1_value->SetString(BookmarkCodec::kNameKey, title)); + child1_value->SetString(BookmarkCodec::kNameKey, title); scoped_ptr<BookmarkModel> decoded_model2(DecodeHelper( *value.get(), enc_checksum, &dec_checksum, false)); } @@ -233,7 +233,7 @@ TEST_F(BookmarkCodecTest, ChecksumManualEditIDsTest) { GetBookmarksBarChildValue(value.get(), i, &child_value); std::string id; ASSERT_TRUE(child_value->GetString(BookmarkCodec::kIdKey, &id)); - ASSERT_TRUE(child_value->SetString(BookmarkCodec::kIdKey, "1")); + child_value->SetString(BookmarkCodec::kIdKey, "1"); } std::string dec_checksum; |