Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: content/browser/download/save_package_unittest.cc

Issue 869823003: Update ReplaceIllegalCharactersInPath to handle quirks in HFS+ and VFS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary #if def Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/download/save_package.cc ('k') | net/base/filename_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/download/save_package.cc ('k') | net/base/filename_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698