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

Side by Side Diff: chrome/browser/protector/protector_service_browsertest.cc

Issue 10826252: Mark ProtectorServiceTest.ShowAndDiscardManually flaky on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « no previous file | 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) 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/protector/mock_setting_change.h" 9 #include "chrome/browser/protector/mock_setting_change.h"
10 #include "chrome/browser/protector/protector_service.h" 10 #include "chrome/browser/protector/protector_service.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 WillOnce(Return(true)); 136 WillOnce(Return(true));
137 protector_service_->ShowChange(mock_change_); 137 protector_service_->ShowChange(mock_change_);
138 content::RunAllPendingInMessageLoop(); 138 content::RunAllPendingInMessageLoop();
139 EXPECT_TRUE(IsGlobalErrorActive(mock_change_)); 139 EXPECT_TRUE(IsGlobalErrorActive(mock_change_));
140 EXPECT_CALL(*mock_change_, Discard(browser())); 140 EXPECT_CALL(*mock_change_, Discard(browser()));
141 protector_service_->DiscardChange(mock_change_, browser()); 141 protector_service_->DiscardChange(mock_change_, browser());
142 content::RunAllPendingInMessageLoop(); 142 content::RunAllPendingInMessageLoop();
143 EXPECT_FALSE(IsGlobalErrorActive(mock_change_)); 143 EXPECT_FALSE(IsGlobalErrorActive(mock_change_));
144 } 144 }
145 145
146 IN_PROC_BROWSER_TEST_F(ProtectorServiceTest, ShowAndDiscardManually) { 146 #if defined(OS_WIN)
147 // http://crbug.com/141916
148 #define MAYBE_ShowAndDiscardManually FLAKY_ShowAndDiscardManually
149 #else
150 #define MAYBE_ShowAndDiscardManually ShowAndDiscardManually
151 #endif
152 IN_PROC_BROWSER_TEST_F(ProtectorServiceTest, MAYBE_ShowAndDiscardManually) {
147 // Show the change and discard it, mimicking a button click. 153 // Show the change and discard it, mimicking a button click.
148 EXPECT_CALL(*mock_change_, MockInit(browser()->profile())). 154 EXPECT_CALL(*mock_change_, MockInit(browser()->profile())).
149 WillOnce(Return(true)); 155 WillOnce(Return(true));
150 protector_service_->ShowChange(mock_change_); 156 protector_service_->ShowChange(mock_change_);
151 content::RunAllPendingInMessageLoop(); 157 content::RunAllPendingInMessageLoop();
152 EXPECT_TRUE(IsGlobalErrorActive(mock_change_)); 158 EXPECT_TRUE(IsGlobalErrorActive(mock_change_));
153 EXPECT_CALL(*mock_change_, Discard(browser())); 159 EXPECT_CALL(*mock_change_, Discard(browser()));
154 // Pressing Apply discards the change. 160 // Pressing Apply discards the change.
155 GlobalError* error = GetGlobalError(mock_change_); 161 GlobalError* error = GetGlobalError(mock_change_);
156 ASSERT_TRUE(error); 162 ASSERT_TRUE(error);
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 653
648 protector_service_->DismissChange(composite_change); 654 protector_service_->DismissChange(composite_change);
649 content::RunAllPendingInMessageLoop(); 655 content::RunAllPendingInMessageLoop();
650 EXPECT_FALSE(IsGlobalErrorActive(composite_change)); 656 EXPECT_FALSE(IsGlobalErrorActive(composite_change));
651 EXPECT_FALSE(protector_service_->GetLastChange()); 657 EXPECT_FALSE(protector_service_->GetLastChange());
652 } 658 }
653 659
654 // TODO(ivankr): Timeout test. 660 // TODO(ivankr): Timeout test.
655 661
656 } // namespace protector 662 } // namespace protector
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698