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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 }, | 375 }, |
376 // Make sure fuzzy matching works. | 376 // Make sure fuzzy matching works. |
377 { "http://foo.com/bar", | 377 { "http://foo.com/bar", |
378 base::ASCIIToUTF16("foo.com/bar"), | 378 base::ASCIIToUTF16("foo.com/bar"), |
379 FPL("bar"), | 379 FPL("bar"), |
380 false | 380 false |
381 }, | 381 }, |
382 // A URL-like title that does not match the title is respected in full. | 382 // A URL-like title that does not match the title is respected in full. |
383 { "http://foo.com", | 383 { "http://foo.com", |
384 base::ASCIIToUTF16("http://www.foo.com/path/title.txt"), | 384 base::ASCIIToUTF16("http://www.foo.com/path/title.txt"), |
385 FPL("http www.foo.com path title.txt"), | 385 FPL("http___www.foo.com_path_title.txt"), |
386 false | 386 false |
387 }, | 387 }, |
388 }; | 388 }; |
389 | 389 |
390 // Crashing on Windows, see http://crbug.com/79365 | 390 // Crashing on Windows, see http://crbug.com/79365 |
391 #if defined(OS_WIN) | 391 #if defined(OS_WIN) |
392 #define MAYBE_TestSuggestedSaveNames DISABLED_TestSuggestedSaveNames | 392 #define MAYBE_TestSuggestedSaveNames DISABLED_TestSuggestedSaveNames |
393 #else | 393 #else |
394 #define MAYBE_TestSuggestedSaveNames TestSuggestedSaveNames | 394 #define MAYBE_TestSuggestedSaveNames TestSuggestedSaveNames |
395 #endif | 395 #endif |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 GURL view_source_url = | 431 GURL view_source_url = |
432 GURL(kViewSourceScheme + std::string(":") + mock_url.spec()); | 432 GURL(kViewSourceScheme + std::string(":") + mock_url.spec()); |
433 GURL actual_url = net::URLRequestMockHTTPJob::GetMockUrl( | 433 GURL actual_url = net::URLRequestMockHTTPJob::GetMockUrl( |
434 base::FilePath(kTestDir).Append(file_name)); | 434 base::FilePath(kTestDir).Append(file_name)); |
435 NavigateAndCommit(view_source_url); | 435 NavigateAndCommit(view_source_url); |
436 EXPECT_EQ(actual_url, GetUrlToBeSaved()); | 436 EXPECT_EQ(actual_url, GetUrlToBeSaved()); |
437 EXPECT_EQ(view_source_url, contents()->GetLastCommittedURL()); | 437 EXPECT_EQ(view_source_url, contents()->GetLastCommittedURL()); |
438 } | 438 } |
439 | 439 |
440 } // namespace content | 440 } // namespace content |
OLD | NEW |