OLD | NEW |
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 // Disable everything on windows only. http://crbug.com/306144 | 5 // Disable everything on windows only. http://crbug.com/306144 |
6 #ifndef OS_WIN | 6 #ifndef OS_WIN |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 | 9 |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 DownloadsNotificationSource* dns = | 178 DownloadsNotificationSource* dns = |
179 content::Source<DownloadsNotificationSource>(source).ptr(); | 179 content::Source<DownloadsNotificationSource>(source).ptr(); |
180 Event* new_event = new Event( | 180 Event* new_event = new Event( |
181 dns->profile, dns->event_name, | 181 dns->profile, dns->event_name, |
182 *content::Details<std::string>(details).ptr(), base::Time::Now()); | 182 *content::Details<std::string>(details).ptr(), base::Time::Now()); |
183 events_.push_back(new_event); | 183 events_.push_back(new_event); |
184 if (waiting_ && | 184 if (waiting_ && |
185 waiting_for_.get() && | 185 waiting_for_.get() && |
186 new_event->Satisfies(*waiting_for_)) { | 186 new_event->Satisfies(*waiting_for_)) { |
187 waiting_ = false; | 187 waiting_ = false; |
188 base::MessageLoopForUI::current()->Quit(); | 188 base::MessageLoopForUI::current()->QuitWhenIdle(); |
189 } | 189 } |
190 break; | 190 break; |
191 } | 191 } |
192 default: | 192 default: |
193 NOTREACHED(); | 193 NOTREACHED(); |
194 } | 194 } |
195 } | 195 } |
196 | 196 |
197 bool WaitFor(Profile* profile, | 197 bool WaitFor(Profile* profile, |
198 const std::string& event_name, | 198 const std::string& event_name, |
(...skipping 3979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4178 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); | 4178 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); |
4179 EXPECT_FALSE(warnings.empty()); | 4179 EXPECT_FALSE(warnings.empty()); |
4180 EXPECT_EQ(Warning::kDownloadFilenameConflict, | 4180 EXPECT_EQ(Warning::kDownloadFilenameConflict, |
4181 warnings.begin()->warning_type()); | 4181 warnings.begin()->warning_type()); |
4182 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); | 4182 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); |
4183 } | 4183 } |
4184 | 4184 |
4185 } // namespace extensions | 4185 } // namespace extensions |
4186 | 4186 |
4187 #endif // http://crbug.com/306144 | 4187 #endif // http://crbug.com/306144 |
OLD | NEW |