OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome_frame/external_tab.h" | 5 #include "chrome_frame/external_tab.h" |
6 #include "base/task.h" | 6 #include "base/task.h" |
7 #include "base/thread.h" | 7 #include "base/thread.h" |
8 #include "base/tracked.h" | 8 #include "base/tracked.h" |
9 | 9 |
10 // #include "base/waitable_event.h" | 10 // #include "base/waitable_event.h" |
11 | 11 |
12 #include "chrome/common/automation_messages.h" | 12 #include "chrome/common/automation_messages.h" |
| 13 #include "chrome_frame/navigation_constraints.h" |
| 14 #include "chrome_frame/test/chrome_frame_test_utils.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gmock_mutant.h" | 17 #include "testing/gmock_mutant.h" |
16 #include "chrome_frame/test/chrome_frame_test_utils.h" | |
17 | 18 |
18 | 19 |
19 | 20 |
20 // DISABLE_RUNNABLE_METHOD_REFCOUNT(ExternalTabProxy); | 21 // DISABLE_RUNNABLE_METHOD_REFCOUNT(ExternalTabProxy); |
21 // DISABLE_RUNNABLE_METHOD_REFCOUNT(UIDelegate); | 22 // DISABLE_RUNNABLE_METHOD_REFCOUNT(UIDelegate); |
22 DISABLE_RUNNABLE_METHOD_REFCOUNT(ChromeProxyDelegate); | 23 DISABLE_RUNNABLE_METHOD_REFCOUNT(ChromeProxyDelegate); |
23 | 24 |
24 using testing::StrictMock; | 25 using testing::StrictMock; |
25 using testing::_; | 26 using testing::_; |
26 using testing::Invoke; | 27 using testing::Invoke; |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 .WillOnce(DoAll(InvokeWithoutArgs(CreateFunctor(&async_events, | 230 .WillOnce(DoAll(InvokeWithoutArgs(CreateFunctor(&async_events, |
230 &AsyncEventCreator::Fire_Disconnected, | 231 &AsyncEventCreator::Fire_Disconnected, |
231 base::TimeDelta::FromMilliseconds(0))), | 232 base::TimeDelta::FromMilliseconds(0))), |
232 Return(0))); | 233 Return(0))); |
233 | 234 |
234 CreateTabParams tab_params; | 235 CreateTabParams tab_params; |
235 tab_params.is_incognito = true; | 236 tab_params.is_incognito = true; |
236 tab_params.is_widget_mode = false; | 237 tab_params.is_widget_mode = false; |
237 tab_params.url = initial_url; | 238 tab_params.url = initial_url; |
238 | 239 |
| 240 NavigationConstraintsImpl navigation_constraints; |
| 241 |
239 tab->CreateTab(tab_params, &ui_delegate); | 242 tab->CreateTab(tab_params, &ui_delegate); |
240 tab->Navigate("http://asgard.org", EmptyString(), true); | 243 tab->Navigate("http://asgard.org", EmptyString(), |
| 244 &navigation_constraints); |
241 | 245 |
242 loop.RunFor(5); | 246 loop.RunFor(5); |
243 EXPECT_FALSE(loop.WasTimedOut()); | 247 EXPECT_FALSE(loop.WasTimedOut()); |
244 tab.reset(); | 248 tab.reset(); |
245 } | 249 } |
OLD | NEW |