| 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 <deque> | 5 #include <deque> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 50 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 51 #include "chrome/browser/safe_browsing/safe_browsing_util.h" | 51 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
| 52 #include "chrome/browser/safe_browsing/test_database_manager.h" | 52 #include "chrome/browser/safe_browsing/test_database_manager.h" |
| 53 #include "chrome/browser/task_management/providers/web_contents/web_contents_tag
s_manager.h" | 53 #include "chrome/browser/task_management/providers/web_contents/web_contents_tag
s_manager.h" |
| 54 #include "chrome/browser/task_management/task_management_browsertest_util.h" | 54 #include "chrome/browser/task_management/task_management_browsertest_util.h" |
| 55 #include "chrome/browser/task_manager/task_manager.h" | 55 #include "chrome/browser/task_manager/task_manager.h" |
| 56 #include "chrome/browser/task_manager/task_manager_browsertest_util.h" | 56 #include "chrome/browser/task_manager/task_manager_browsertest_util.h" |
| 57 #include "chrome/browser/ui/browser.h" | 57 #include "chrome/browser/ui/browser.h" |
| 58 #include "chrome/browser/ui/browser_commands.h" | 58 #include "chrome/browser/ui/browser_commands.h" |
| 59 #include "chrome/browser/ui/browser_finder.h" | 59 #include "chrome/browser/ui/browser_finder.h" |
| 60 #include "chrome/browser/ui/browser_navigator.h" | |
| 61 #include "chrome/browser/ui/browser_window.h" | 60 #include "chrome/browser/ui/browser_window.h" |
| 62 #include "chrome/browser/ui/location_bar/location_bar.h" | 61 #include "chrome/browser/ui/location_bar/location_bar.h" |
| 63 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 62 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 64 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 63 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
| 65 #include "chrome/common/chrome_paths.h" | 64 #include "chrome/common/chrome_paths.h" |
| 66 #include "chrome/common/chrome_switches.h" | 65 #include "chrome/common/chrome_switches.h" |
| 67 #include "chrome/common/pref_names.h" | 66 #include "chrome/common/pref_names.h" |
| 68 #include "chrome/grit/generated_resources.h" | 67 #include "chrome/grit/generated_resources.h" |
| 69 #include "chrome/test/base/in_process_browser_test.h" | 68 #include "chrome/test/base/in_process_browser_test.h" |
| 70 #include "chrome/test/base/test_switches.h" | 69 #include "chrome/test/base/test_switches.h" |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 if (count_ < expected_count) { | 938 if (count_ < expected_count) { |
| 940 expected_count_ = expected_count; | 939 expected_count_ = expected_count; |
| 941 loop_.reset(new base::RunLoop); | 940 loop_.reset(new base::RunLoop); |
| 942 loop_->Run(); | 941 loop_->Run(); |
| 943 expected_count_ = -1; | 942 expected_count_ = -1; |
| 944 loop_.reset(); | 943 loop_.reset(); |
| 945 } | 944 } |
| 946 | 945 |
| 947 EXPECT_EQ(expected_count, count_); | 946 EXPECT_EQ(expected_count, count_); |
| 948 } | 947 } |
| 948 |
| 949 private: | 949 private: |
| 950 int count_; | 950 int count_; |
| 951 int expected_count_; | 951 int expected_count_; |
| 952 scoped_ptr<base::RunLoop> loop_; | 952 scoped_ptr<base::RunLoop> loop_; |
| 953 }; | 953 }; |
| 954 | 954 |
| 955 // Protocol handler which counts the number of requests that start. | 955 // Protocol handler which counts the number of requests that start. |
| 956 class CountingInterceptor : public net::URLRequestInterceptor { | 956 class CountingInterceptor : public net::URLRequestInterceptor { |
| 957 public: | 957 public: |
| 958 CountingInterceptor(const base::FilePath& file, | 958 CountingInterceptor(const base::FilePath& file, |
| (...skipping 3201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4160 | 4160 |
| 4161 NavigateToDestURL(); | 4161 NavigateToDestURL(); |
| 4162 EXPECT_EQ(1U, task_manager.tasks().size()); | 4162 EXPECT_EQ(1U, task_manager.tasks().size()); |
| 4163 } | 4163 } |
| 4164 | 4164 |
| 4165 } // namespace | 4165 } // namespace |
| 4166 | 4166 |
| 4167 #endif // defined(ENABLE_TASK_MANAGER) | 4167 #endif // defined(ENABLE_TASK_MANAGER) |
| 4168 | 4168 |
| 4169 } // namespace prerender | 4169 } // namespace prerender |
| OLD | NEW |