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

Side by Side Diff: chrome/browser/extensions/extension_toolbar_model_browsertest.cc

Issue 309533013: Add traces temporarily to track down flakiness in test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/macros.h" 5 #include "base/macros.h"
6 #include "chrome/browser/extensions/extension_browsertest.h" 6 #include "chrome/browser/extensions/extension_browsertest.h"
7 #include "chrome/browser/extensions/extension_toolbar_model.h" 7 #include "chrome/browser/extensions/extension_toolbar_model.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 577
578 // When we stop highlighting, we should see the new extension show up. 578 // When we stop highlighting, we should see the new extension show up.
579 model_->StopHighlighting(); 579 model_->StopHighlighting();
580 EXPECT_FALSE(model_->is_highlighting()); 580 EXPECT_FALSE(model_->is_highlighting());
581 EXPECT_EQ(3u, model_->toolbar_items().size()); 581 EXPECT_EQ(3u, model_->toolbar_items().size());
582 EXPECT_EQ(id_a, ExtensionAt(0)->id()); 582 EXPECT_EQ(id_a, ExtensionAt(0)->id());
583 EXPECT_EQ(id_b, ExtensionAt(1)->id()); 583 EXPECT_EQ(id_b, ExtensionAt(1)->id());
584 EXPECT_EQ(id_c, ExtensionAt(2)->id()); 584 EXPECT_EQ(id_c, ExtensionAt(2)->id());
585 } 585 }
586 586
587 // Test is flaky on Linus and ChromeOS, see crbug.com/379170. 587 // Test is flaky (see crbug.com/379170), but currently enabled to gather traces.
588 #if defined(OS_LINUX) || defined(OS_CHROMEOS) 588 // If it fails, ping Finnur.
589 #define MAYBE_SizeAfterPrefChange DISABLED_SizeAfterPrefChange 589 IN_PROC_BROWSER_TEST_F(ExtensionToolbarModelTest, SizeAfterPrefChange) {
590 #else
591 #define MAYBE_SizeAfterPrefChange SizeAfterPrefChange
592 #endif
593 IN_PROC_BROWSER_TEST_F(ExtensionToolbarModelTest, MAYBE_SizeAfterPrefChange) {
594 // Load two extensions with browser action. 590 // Load two extensions with browser action.
595 base::FilePath extension_a_path(test_data_dir_.AppendASCII("api_test") 591 base::FilePath extension_a_path(test_data_dir_.AppendASCII("api_test")
596 .AppendASCII("browser_action") 592 .AppendASCII("browser_action")
597 .AppendASCII("basics")); 593 .AppendASCII("basics"));
594 LOG(ERROR) << "Loading [basics]";
598 ASSERT_TRUE(LoadExtension(extension_a_path)); 595 ASSERT_TRUE(LoadExtension(extension_a_path));
599 base::FilePath extension_b_path(test_data_dir_.AppendASCII("api_test") 596 base::FilePath extension_b_path(test_data_dir_.AppendASCII("api_test")
600 .AppendASCII("browser_action") 597 .AppendASCII("browser_action")
601 .AppendASCII("popup")); 598 .AppendASCII("popup"));
599 LOG(ERROR) << "Loading [popup]";
602 ASSERT_TRUE(LoadExtension(extension_b_path)); 600 ASSERT_TRUE(LoadExtension(extension_b_path));
603 std::string id_a = ExtensionAt(0)->id(); 601 std::string id_a = ExtensionAt(0)->id();
604 std::string id_b = ExtensionAt(1)->id(); 602 std::string id_b = ExtensionAt(1)->id();
605 603
604 LOG(ERROR) << "GetVisibleIconCount";
605
606 // Should be at max size (-1). 606 // Should be at max size (-1).
607 EXPECT_EQ(-1, model_->GetVisibleIconCount()); 607 EXPECT_EQ(-1, model_->GetVisibleIconCount());
608 608
609 LOG(ERROR) << "OnExtensionToolbarPrefChange";
609 model_->OnExtensionToolbarPrefChange(); 610 model_->OnExtensionToolbarPrefChange();
610 611
612 LOG(ERROR) << "GetVisibleIconCount";
613
611 // Should still be at max size. 614 // Should still be at max size.
612 EXPECT_EQ(-1, model_->GetVisibleIconCount()); 615 EXPECT_EQ(-1, model_->GetVisibleIconCount());
613 } 616 }
614 617
615 } // namespace extensions 618 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698