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

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

Issue 417453002: Disable all the tests that are flaking more than 5% on Linux builders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/bookmarks/browser/bookmark_utils.h" 5 #include "components/bookmarks/browser/bookmark_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 ui::ScopedClipboardWriter clipboard_writer( 278 ui::ScopedClipboardWriter clipboard_writer(
279 ui::Clipboard::GetForCurrentThread(), 279 ui::Clipboard::GetForCurrentThread(),
280 ui::CLIPBOARD_TYPE_COPY_PASTE); 280 ui::CLIPBOARD_TYPE_COPY_PASTE);
281 clipboard_writer.WriteText(ASCIIToUTF16("foo")); 281 clipboard_writer.WriteText(ASCIIToUTF16("foo"));
282 } 282 }
283 283
284 // Now we shouldn't be able to paste from the clipboard. 284 // Now we shouldn't be able to paste from the clipboard.
285 EXPECT_FALSE(CanPasteFromClipboard(model.get(), model->bookmark_bar_node())); 285 EXPECT_FALSE(CanPasteFromClipboard(model.get(), model->bookmark_bar_node()));
286 } 286 }
287 287
288 TEST_F(BookmarkUtilsTest, CutToClipboard) { 288 #if defined(OS_LINUX) || defined(OS_MACOSX)
289 // http://crbug.com/396472
290 #define MAYBE_CutToClipboard DISABLED_CutToClipboard
291 #else
292 #define MAYBE_CutToClipboard CutToClipboard
293 #endif
294 TEST_F(BookmarkUtilsTest, MAYBE_CutToClipboard) {
289 test::TestBookmarkClient client; 295 test::TestBookmarkClient client;
290 scoped_ptr<BookmarkModel> model(client.CreateModel(false)); 296 scoped_ptr<BookmarkModel> model(client.CreateModel(false));
291 model->AddObserver(this); 297 model->AddObserver(this);
292 298
293 base::string16 title(ASCIIToUTF16("foo")); 299 base::string16 title(ASCIIToUTF16("foo"));
294 GURL url("http://foo.com"); 300 GURL url("http://foo.com");
295 const BookmarkNode* n1 = model->AddURL(model->other_node(), 0, title, url); 301 const BookmarkNode* n1 = model->AddURL(model->other_node(), 0, title, url);
296 const BookmarkNode* n2 = model->AddURL(model->other_node(), 1, title, url); 302 const BookmarkNode* n2 = model->AddURL(model->other_node(), 1, title, url);
297 303
298 // Cut the nodes to the clipboard. 304 // Cut the nodes to the clipboard.
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 model->GetNodesByURL(url, &nodes); 451 model->GetNodesByURL(url, &nodes);
446 ASSERT_EQ(1u, nodes.size()); 452 ASSERT_EQ(1u, nodes.size());
447 EXPECT_TRUE(model->bookmark_bar_node()->empty()); 453 EXPECT_TRUE(model->bookmark_bar_node()->empty());
448 EXPECT_TRUE(model->other_node()->empty()); 454 EXPECT_TRUE(model->other_node()->empty());
449 EXPECT_TRUE(model->mobile_node()->empty()); 455 EXPECT_TRUE(model->mobile_node()->empty());
450 EXPECT_EQ(1, extra_node->child_count()); 456 EXPECT_EQ(1, extra_node->child_count());
451 } 457 }
452 458
453 } // namespace 459 } // namespace
454 } // namespace bookmarks 460 } // namespace bookmarks
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698