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

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

Issue 7744039: Switch ChromeTestSuite to the same convention as ContentTestSuite: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixing Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_model.h" 10 #include "chrome/browser/bookmarks/bookmark_model.h"
11 #include "chrome/browser/bookmarks/bookmark_utils.h" 11 #include "chrome/browser/bookmarks/bookmark_utils.h"
12 #include "chrome/test/base/testing_browser_process_test.h"
13 #include "ui/base/clipboard/scoped_clipboard_writer.h" 12 #include "ui/base/clipboard/scoped_clipboard_writer.h"
14 13
15 #if !defined(OS_MACOSX) 14 #if !defined(OS_MACOSX)
16 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
17 #endif 16 #endif
18 17
19 typedef TestingBrowserProcessTest BookmarkUtilsTest; 18 typedef testing::Test BookmarkUtilsTest;
20 19
21 TEST_F(BookmarkUtilsTest, GetBookmarksContainingText) { 20 TEST_F(BookmarkUtilsTest, GetBookmarksContainingText) {
22 BookmarkModel model(NULL); 21 BookmarkModel model(NULL);
23 const BookmarkNode* n1 = 22 const BookmarkNode* n1 =
24 model.AddURL(model.other_node(), 0, ASCIIToUTF16("foo bar"), 23 model.AddURL(model.other_node(), 0, ASCIIToUTF16("foo bar"),
25 GURL("http://www.google.com")); 24 GURL("http://www.google.com"));
26 const BookmarkNode* n2 = 25 const BookmarkNode* n2 =
27 model.AddURL(model.other_node(), 0, ASCIIToUTF16("baz buz"), 26 model.AddURL(model.other_node(), 0, ASCIIToUTF16("baz buz"),
28 GURL("http://www.cnn.com")); 27 GURL("http://www.cnn.com"));
29 28
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 { 122 {
124 ui::ScopedClipboardWriter clipboard_writer(g_browser_process->clipboard()); 123 ui::ScopedClipboardWriter clipboard_writer(g_browser_process->clipboard());
125 clipboard_writer.WriteText(ASCIIToUTF16("foo")); 124 clipboard_writer.WriteText(ASCIIToUTF16("foo"));
126 } 125 }
127 126
128 // Now we shouldn't be able to paste from the clipboard. 127 // Now we shouldn't be able to paste from the clipboard.
129 EXPECT_FALSE( 128 EXPECT_FALSE(
130 bookmark_utils::CanPasteFromClipboard(model.bookmark_bar_node())); 129 bookmark_utils::CanPasteFromClipboard(model.bookmark_bar_node()));
131 } 130 }
132 #endif 131 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698