OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/browser/sessions/session_restore_test_helper.h" | 5 #include "chrome/browser/sessions/session_restore_test_helper.h" |
6 | 6 |
7 #include "content/public/test/test_utils.h" | 7 #include "content/public/test/test_utils.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 SessionRestoreTestHelper::SessionRestoreTestHelper() | 10 SessionRestoreTestHelper::SessionRestoreTestHelper() |
(...skipping 11 matching lines...) Expand all Loading... |
22 void SessionRestoreTestHelper::Wait() { | 22 void SessionRestoreTestHelper::Wait() { |
23 if (restore_notification_seen_) | 23 if (restore_notification_seen_) |
24 return; | 24 return; |
25 | 25 |
26 loop_is_running_ = true; | 26 loop_is_running_ = true; |
27 message_loop_runner_ = new content::MessageLoopRunner; | 27 message_loop_runner_ = new content::MessageLoopRunner; |
28 message_loop_runner_->Run(); | 28 message_loop_runner_->Run(); |
29 EXPECT_TRUE(restore_notification_seen_); | 29 EXPECT_TRUE(restore_notification_seen_); |
30 } | 30 } |
31 | 31 |
32 void SessionRestoreTestHelper::OnSessionRestoreDone() { | 32 void SessionRestoreTestHelper::OnSessionRestoreDone( |
| 33 int /* num_tabs_restored */) { |
33 restore_notification_seen_ = true; | 34 restore_notification_seen_ = true; |
34 if (!loop_is_running_) | 35 if (!loop_is_running_) |
35 return; | 36 return; |
36 | 37 |
37 message_loop_runner_->Quit(); | 38 message_loop_runner_->Quit(); |
38 loop_is_running_ = false; | 39 loop_is_running_ = false; |
39 } | 40 } |
OLD | NEW |