| 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 "chrome/browser/download/download_item_model.h" | 5 #include "chrome/browser/download/download_item_model.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/string16.h" | 12 #include "base/string16.h" |
| 13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "content/test/mock_download_item.h" | 15 #include "content/public/test/mock_download_item.h" |
| 16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
| 17 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
| 20 #include "ui/base/text/bytes_formatting.h" | 20 #include "ui/base/text/bytes_formatting.h" |
| 21 #include "ui/gfx/font.h" | 21 #include "ui/gfx/font.h" |
| 22 | 22 |
| 23 using ::testing::AtLeast; | 23 using ::testing::AtLeast; |
| 24 using ::testing::Mock; | 24 using ::testing::Mock; |
| 25 using ::testing::NiceMock; | 25 using ::testing::NiceMock; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 TestStatusText(kInterruptReasons[i]); | 158 TestStatusText(kInterruptReasons[i]); |
| 159 } | 159 } |
| 160 | 160 |
| 161 TEST_F(DownloadItemModelTest, InterruptTooltip) { | 161 TEST_F(DownloadItemModelTest, InterruptTooltip) { |
| 162 SetupDownloadItemDefaults(GURL("http://foo.bar/")); | 162 SetupDownloadItemDefaults(GURL("http://foo.bar/")); |
| 163 // Iterating through all the reason codes to exercise all the status strings. | 163 // Iterating through all the reason codes to exercise all the status strings. |
| 164 // We also check whether the strings are properly elided. | 164 // We also check whether the strings are properly elided. |
| 165 for (unsigned i = 0; i < arraysize(kInterruptReasons); ++i) | 165 for (unsigned i = 0; i < arraysize(kInterruptReasons); ++i) |
| 166 TestTooltipText(kInterruptReasons[i]); | 166 TestTooltipText(kInterruptReasons[i]); |
| 167 } | 167 } |
| OLD | NEW |