OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/android/offline_pages/prerendering_offliner.h" | 5 #include "chrome/browser/android/offline_pages/prerendering_offliner.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "base/sys_info.h" | 11 #include "base/sys_info.h" |
12 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "chrome/browser/android/offline_pages/prerendering_loader.h" | 13 #include "chrome/browser/android/offline_pages/prerendering_loader.h" |
14 #include "chrome/browser/net/prediction_options.h" | 14 #include "chrome/browser/net/prediction_options.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
17 #include "components/content_settings/core/common/pref_names.h" | 17 #include "components/content_settings/core/common/pref_names.h" |
18 #include "components/offline_pages/background/offliner.h" | 18 #include "components/offline_pages/core/background/offliner.h" |
19 #include "components/offline_pages/background/save_page_request.h" | 19 #include "components/offline_pages/core/background/save_page_request.h" |
20 #include "components/offline_pages/stub_offline_page_model.h" | 20 #include "components/offline_pages/core/stub_offline_page_model.h" |
21 #include "components/prefs/pref_service.h" | 21 #include "components/prefs/pref_service.h" |
22 #include "content/public/test/test_browser_thread_bundle.h" | 22 #include "content/public/test/test_browser_thread_bundle.h" |
23 #include "content/public/test/web_contents_tester.h" | 23 #include "content/public/test/web_contents_tester.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
25 | 25 |
26 namespace offline_pages { | 26 namespace offline_pages { |
27 | 27 |
28 namespace { | 28 namespace { |
29 const int64_t kRequestId = 7; | 29 const int64_t kRequestId = 7; |
30 const GURL kHttpUrl("http://tunafish.com"); | 30 const GURL kHttpUrl("http://tunafish.com"); |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 EXPECT_FALSE(loader()->IsIdle()); | 394 EXPECT_FALSE(loader()->IsIdle()); |
395 | 395 |
396 offliner()->SetApplicationStateForTesting( | 396 offliner()->SetApplicationStateForTesting( |
397 base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES); | 397 base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES); |
398 | 398 |
399 // Loader still loading since not low-end device. | 399 // Loader still loading since not low-end device. |
400 EXPECT_FALSE(loader()->IsIdle()); | 400 EXPECT_FALSE(loader()->IsIdle()); |
401 } | 401 } |
402 | 402 |
403 } // namespace offline_pages | 403 } // namespace offline_pages |
OLD | NEW |