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 // Navigates the browser to server and client redirect pages and makes sure | 5 // Navigates the browser to server and client redirect pages and makes sure |
6 // that the correct redirects are reflected in the history database. Errors | 6 // that the correct redirects are reflected in the history database. Errors |
7 // here might indicate that WebKit changed the calls our glue layer gets in | 7 // here might indicate that WebKit changed the calls our glue layer gets in |
8 // the case of redirects. It may also mean problems with the history system. | 8 // the case of redirects. It may also mean problems with the history system. |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
14 #include "base/files/scoped_temp_dir.h" | 14 #include "base/files/scoped_temp_dir.h" |
15 #include "base/location.h" | 15 #include "base/location.h" |
| 16 #include "base/message_loop/message_loop.h" |
16 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
17 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
18 #include "base/strings/string_util.h" | 19 #include "base/strings/string_util.h" |
19 #include "base/strings/stringprintf.h" | 20 #include "base/strings/stringprintf.h" |
20 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
21 #include "base/task/cancelable_task_tracker.h" | 22 #include "base/task/cancelable_task_tracker.h" |
22 #include "base/test/test_timeouts.h" | 23 #include "base/test/test_timeouts.h" |
23 #include "base/threading/platform_thread.h" | 24 #include "base/threading/platform_thread.h" |
24 #include "base/threading/thread_restrictions.h" | 25 #include "base/threading/thread_restrictions.h" |
25 #include "base/threading/thread_task_runner_handle.h" | 26 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 // as a client redirect from the first (/client-redirect?) page. | 307 // as a client redirect from the first (/client-redirect?) page. |
307 for (std::vector<GURL>::iterator it = redirects.begin(); | 308 for (std::vector<GURL>::iterator it = redirects.begin(); |
308 it != redirects.end(); ++it) { | 309 it != redirects.end(); ++it) { |
309 if (final_url.spec() == it->spec()) { | 310 if (final_url.spec() == it->spec()) { |
310 final_navigation_not_redirect = false; | 311 final_navigation_not_redirect = false; |
311 break; | 312 break; |
312 } | 313 } |
313 } | 314 } |
314 EXPECT_TRUE(final_navigation_not_redirect); | 315 EXPECT_TRUE(final_navigation_not_redirect); |
315 } | 316 } |
OLD | NEW |