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 #include <algorithm> | 5 #include <algorithm> |
6 #include <iterator> | 6 #include <iterator> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 num_extension_icons_changed_++; | 136 num_extension_icons_changed_++; |
137 } | 137 } |
138 virtual void OnInlineDisposition( | 138 virtual void OnInlineDisposition( |
139 const string16& title, const GURL& url) OVERRIDE { | 139 const string16& title, const GURL& url) OVERRIDE { |
140 num_inline_disposition_++; | 140 num_inline_disposition_++; |
141 } | 141 } |
142 | 142 |
143 void Wait() { | 143 void Wait() { |
144 if (!pending_async_completed_) { | 144 if (!pending_async_completed_) { |
145 message_loop_started_ = true; | 145 message_loop_started_ = true; |
146 ui_test_utils::RunMessageLoop(); | 146 content::RunMessageLoop(); |
147 pending_async_completed_ = false; | 147 pending_async_completed_ = false; |
148 } | 148 } |
149 } | 149 } |
150 | 150 |
151 void StopWaiting() { | 151 void StopWaiting() { |
152 pending_async_completed_ = true; | 152 pending_async_completed_ = true; |
153 if (message_loop_started_) | 153 if (message_loop_started_) |
154 MessageLoop::current()->Quit(); | 154 MessageLoop::current()->Quit(); |
155 } | 155 } |
156 | 156 |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 | 623 |
624 EXPECT_EQ(2, picker_.num_installed_services_); | 624 EXPECT_EQ(2, picker_.num_installed_services_); |
625 | 625 |
626 // The tab is shown immediately without needing to call OnServiceChosen. | 626 // The tab is shown immediately without needing to call OnServiceChosen. |
627 ASSERT_EQ(2, browser()->tab_count()); | 627 ASSERT_EQ(2, browser()->tab_count()); |
628 EXPECT_EQ(GURL(kServiceURL1), | 628 EXPECT_EQ(GURL(kServiceURL1), |
629 chrome::GetActiveWebContents(browser())->GetURL()); | 629 chrome::GetActiveWebContents(browser())->GetURL()); |
630 | 630 |
631 EXPECT_TRUE(dispatcher.dispatched_); | 631 EXPECT_TRUE(dispatcher.dispatched_); |
632 } | 632 } |
OLD | NEW |