| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 3024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3035 for (size_t i = 1; i < arraysize(kRestoredURLs); ++i) { | 3035 for (size_t i = 1; i < arraysize(kRestoredURLs); ++i) { |
| 3036 content::WindowedNotificationObserver observer( | 3036 content::WindowedNotificationObserver observer( |
| 3037 content::NOTIFICATION_LOAD_STOP, | 3037 content::NOTIFICATION_LOAD_STOP, |
| 3038 content::NotificationService::AllSources()); | 3038 content::NotificationService::AllSources()); |
| 3039 chrome::AddSelectedTabWithURL(browser(), GURL(kRestoredURLs[i]), | 3039 chrome::AddSelectedTabWithURL(browser(), GURL(kRestoredURLs[i]), |
| 3040 ui::PAGE_TRANSITION_LINK); | 3040 ui::PAGE_TRANSITION_LINK); |
| 3041 observer.Wait(); | 3041 observer.Wait(); |
| 3042 } | 3042 } |
| 3043 } | 3043 } |
| 3044 | 3044 |
| 3045 IN_PROC_BROWSER_TEST_P(RestoreOnStartupPolicyTest, RunTest) { | 3045 // Flaky(crbug.com/701023) |
| 3046 IN_PROC_BROWSER_TEST_P(RestoreOnStartupPolicyTest, DISABLED_RunTest) { |
| 3046 TabStripModel* model = browser()->tab_strip_model(); | 3047 TabStripModel* model = browser()->tab_strip_model(); |
| 3047 int size = static_cast<int>(expected_urls_.size()); | 3048 int size = static_cast<int>(expected_urls_.size()); |
| 3048 EXPECT_EQ(size, model->count()); | 3049 EXPECT_EQ(size, model->count()); |
| 3049 for (int i = 0; i < size && i < model->count(); ++i) { | 3050 for (int i = 0; i < size && i < model->count(); ++i) { |
| 3050 EXPECT_EQ(expected_urls_[i], model->GetWebContentsAt(i)->GetURL()); | 3051 EXPECT_EQ(expected_urls_[i], model->GetWebContentsAt(i)->GetURL()); |
| 3051 } | 3052 } |
| 3052 } | 3053 } |
| 3053 | 3054 |
| 3054 INSTANTIATE_TEST_CASE_P( | 3055 INSTANTIATE_TEST_CASE_P( |
| 3055 RestoreOnStartupPolicyTestInstance, | 3056 RestoreOnStartupPolicyTestInstance, |
| (...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4470 | 4471 |
| 4471 SetEmptyPolicy(); | 4472 SetEmptyPolicy(); |
| 4472 // Policy not set. | 4473 // Policy not set. |
| 4473 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); | 4474 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); |
| 4474 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); | 4475 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); |
| 4475 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4476 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
| 4476 } | 4477 } |
| 4477 #endif // defined(OS_CHROMEOS) | 4478 #endif // defined(OS_CHROMEOS) |
| 4478 | 4479 |
| 4479 } // namespace policy | 4480 } // namespace policy |
| OLD | NEW |