OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/url_formatter/elide_url.h" | 5 #include "components/url_formatter/elide_url.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/ios/ios_util.h" | |
10 #include "base/macros.h" | 9 #include "base/macros.h" |
11 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
12 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
13 #include "build/build_config.h" | 12 #include "build/build_config.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "url/gurl.h" | 14 #include "url/gurl.h" |
16 #include "url/origin.h" | 15 #include "url/origin.h" |
17 | 16 |
18 #if !defined(OS_ANDROID) | 17 #if !defined(OS_ANDROID) |
19 #include "ui/gfx/font_list.h" // nogncheck | 18 #include "ui/gfx/font_list.h" // nogncheck |
20 #include "ui/gfx/text_elider.h" // nogncheck | 19 #include "ui/gfx/text_elider.h" // nogncheck |
21 #include "ui/gfx/text_utils.h" // nogncheck | 20 #include "ui/gfx/text_utils.h" // nogncheck |
22 #endif | 21 #endif |
23 | 22 |
| 23 #if defined(OS_IOS) |
| 24 #include "base/ios/ios_util.h" |
| 25 #endif |
| 26 |
24 namespace { | 27 namespace { |
25 | 28 |
26 struct Testcase { | 29 struct Testcase { |
27 const std::string input; | 30 const std::string input; |
28 const std::string output; | 31 const std::string output; |
29 enum SupportedPlatforms { | 32 enum SupportedPlatforms { |
30 ALL = 0, | 33 ALL = 0, |
31 NO_IOS9_OR_LATER, | 34 NO_IOS9_OR_LATER, |
32 NO_IOS, | 35 NO_IOS, |
33 } platforms; | 36 } platforms; |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 EXPECT_EQ(base::string16(), formatted_omit_scheme) | 520 EXPECT_EQ(base::string16(), formatted_omit_scheme) |
518 << "Explicitly test the url::Origin which takes an empty, invalid URL"; | 521 << "Explicitly test the url::Origin which takes an empty, invalid URL"; |
519 | 522 |
520 formatted_omit_scheme = url_formatter::FormatOriginForSecurityDisplay( | 523 formatted_omit_scheme = url_formatter::FormatOriginForSecurityDisplay( |
521 url::Origin(GURL()), url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC); | 524 url::Origin(GURL()), url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC); |
522 EXPECT_EQ(base::string16(), formatted_omit_scheme) | 525 EXPECT_EQ(base::string16(), formatted_omit_scheme) |
523 << "Explicitly test the url::Origin which takes an empty, invalid URL"; | 526 << "Explicitly test the url::Origin which takes an empty, invalid URL"; |
524 } | 527 } |
525 | 528 |
526 } // namespace | 529 } // namespace |
OLD | NEW |