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 // Disable everything on windows only. http://crbug.com/306144 | 5 // Disable everything on windows only. http://crbug.com/306144 |
6 #ifndef OS_WIN | 6 #ifndef OS_WIN |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 MockIconExtractorImpl(const base::FilePath& path, | 616 MockIconExtractorImpl(const base::FilePath& path, |
617 IconLoader::IconSize icon_size, | 617 IconLoader::IconSize icon_size, |
618 const std::string& response) | 618 const std::string& response) |
619 : expected_path_(path), | 619 : expected_path_(path), |
620 expected_icon_size_(icon_size), | 620 expected_icon_size_(icon_size), |
621 response_(response) { | 621 response_(response) { |
622 } | 622 } |
623 virtual ~MockIconExtractorImpl() {} | 623 virtual ~MockIconExtractorImpl() {} |
624 | 624 |
625 virtual bool ExtractIconURLForPath(const base::FilePath& path, | 625 virtual bool ExtractIconURLForPath(const base::FilePath& path, |
| 626 float scale, |
626 IconLoader::IconSize icon_size, | 627 IconLoader::IconSize icon_size, |
627 IconURLCallback callback) OVERRIDE { | 628 IconURLCallback callback) OVERRIDE { |
628 EXPECT_STREQ(expected_path_.value().c_str(), path.value().c_str()); | 629 EXPECT_STREQ(expected_path_.value().c_str(), path.value().c_str()); |
629 EXPECT_EQ(expected_icon_size_, icon_size); | 630 EXPECT_EQ(expected_icon_size_, icon_size); |
630 if (expected_path_ == path && | 631 if (expected_path_ == path && |
631 expected_icon_size_ == icon_size) { | 632 expected_icon_size_ == icon_size) { |
632 callback_ = callback; | 633 callback_ = callback; |
633 BrowserThread::PostTask( | 634 BrowserThread::PostTask( |
634 BrowserThread::UI, FROM_HERE, | 635 BrowserThread::UI, FROM_HERE, |
635 base::Bind(&MockIconExtractorImpl::RunCallback, | 636 base::Bind(&MockIconExtractorImpl::RunCallback, |
(...skipping 2998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3634 EXPECT_EQ("suggester", winner_id); | 3635 EXPECT_EQ("suggester", winner_id); |
3635 EXPECT_EQ(FILE_PATH_LITERAL("b"), filename.value()); | 3636 EXPECT_EQ(FILE_PATH_LITERAL("b"), filename.value()); |
3636 EXPECT_EQ(api::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); | 3637 EXPECT_EQ(api::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); |
3637 EXPECT_FALSE(warnings.empty()); | 3638 EXPECT_FALSE(warnings.empty()); |
3638 EXPECT_EQ(extensions::ExtensionWarning::kDownloadFilenameConflict, | 3639 EXPECT_EQ(extensions::ExtensionWarning::kDownloadFilenameConflict, |
3639 warnings.begin()->warning_type()); | 3640 warnings.begin()->warning_type()); |
3640 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); | 3641 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); |
3641 } | 3642 } |
3642 | 3643 |
3643 #endif // http://crbug.com/3061144 | 3644 #endif // http://crbug.com/3061144 |
OLD | NEW |