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

Side by Side Diff: chrome/browser/bookmarks/bookmark_html_writer_unittest.cc

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/bookmarks/bookmark_html_writer.h" 5 #include "chrome/browser/bookmarks/bookmark_html_writer.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 FilePath path_; 122 FilePath path_;
123 }; 123 };
124 124
125 // Class that will notify message loop when file is written. 125 // Class that will notify message loop when file is written.
126 class BookmarksObserver : public BookmarksExportObserver { 126 class BookmarksObserver : public BookmarksExportObserver {
127 public: 127 public:
128 explicit BookmarksObserver(MessageLoop* loop) : loop_(loop) { 128 explicit BookmarksObserver(MessageLoop* loop) : loop_(loop) {
129 DCHECK(loop); 129 DCHECK(loop);
130 } 130 }
131 131
132 virtual void OnExportFinished() { 132 virtual void OnExportFinished() OVERRIDE {
133 loop_->Quit(); 133 loop_->Quit();
134 } 134 }
135 135
136 private: 136 private:
137 MessageLoop* loop_; 137 MessageLoop* loop_;
138 DISALLOW_COPY_AND_ASSIGN(BookmarksObserver); 138 DISALLOW_COPY_AND_ASSIGN(BookmarksObserver);
139 }; 139 };
140 140
141 // Tests bookmark_html_writer by populating a BookmarkModel, writing it out by 141 // Tests bookmark_html_writer by populating a BookmarkModel, writing it out by
142 // way of bookmark_html_writer, then using the importer to read it back in. 142 // way of bookmark_html_writer, then using the importer to read it back in.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 bookmark_folder_name, string16(), string16()); 265 bookmark_folder_name, string16(), string16());
266 AssertBookmarkEntryEquals(parsed_bookmarks[4], false, url1, url1_title, t1, 266 AssertBookmarkEntryEquals(parsed_bookmarks[4], false, url1, url1_title, t1,
267 string16(), string16(), string16()); 267 string16(), string16(), string16());
268 AssertBookmarkEntryEquals(parsed_bookmarks[5], false, url2, url2_title, t2, 268 AssertBookmarkEntryEquals(parsed_bookmarks[5], false, url2, url2_title, t2,
269 string16(), string16(), string16()); 269 string16(), string16(), string16());
270 AssertBookmarkEntryEquals(parsed_bookmarks[6], false, url1, url1_title, t1, 270 AssertBookmarkEntryEquals(parsed_bookmarks[6], false, url1, url1_title, t1,
271 f3_title, f4_title, string16()); 271 f3_title, f4_title, string16());
272 AssertBookmarkEntryEquals(parsed_bookmarks[7], false, url1, url1_title, t1, 272 AssertBookmarkEntryEquals(parsed_bookmarks[7], false, url1, url1_title, t1,
273 string16(), string16(), string16()); 273 string16(), string16(), string16());
274 } 274 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698