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 "chrome/browser/translate/translate_service.h" | 5 #include "chrome/browser/translate/translate_service.h" |
6 | 6 |
| 7 #include "build/build_config.h" |
7 #include "content/public/common/url_constants.h" | 8 #include "content/public/common/url_constants.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "url/gurl.h" | 10 #include "url/gurl.h" |
10 | 11 |
11 #if defined(OS_CHROMEOS) | 12 #if defined(OS_CHROMEOS) |
12 #include "chrome/browser/chromeos/file_manager/app_id.h" | 13 #include "chrome/browser/chromeos/file_manager/app_id.h" |
13 #include "extensions/common/constants.h" | 14 #include "extensions/common/constants.h" |
14 #endif | 15 #endif |
15 | 16 |
16 TEST(TranslateServiceTest, CheckTranslatableURL) { | 17 TEST(TranslateServiceTest, CheckTranslatableURL) { |
(...skipping 16 matching lines...) Expand all Loading... |
33 EXPECT_FALSE(TranslateService::IsTranslatableURL(filemanager_url)); | 34 EXPECT_FALSE(TranslateService::IsTranslatableURL(filemanager_url)); |
34 #endif | 35 #endif |
35 | 36 |
36 std::string ftp = std::string(url::kFtpScheme) + "://google.com/pub"; | 37 std::string ftp = std::string(url::kFtpScheme) + "://google.com/pub"; |
37 GURL ftp_url = GURL(ftp); | 38 GURL ftp_url = GURL(ftp); |
38 EXPECT_FALSE(TranslateService::IsTranslatableURL(ftp_url)); | 39 EXPECT_FALSE(TranslateService::IsTranslatableURL(ftp_url)); |
39 | 40 |
40 GURL right_url = GURL("http://www.tamurayukari.com/"); | 41 GURL right_url = GURL("http://www.tamurayukari.com/"); |
41 EXPECT_TRUE(TranslateService::IsTranslatableURL(right_url)); | 42 EXPECT_TRUE(TranslateService::IsTranslatableURL(right_url)); |
42 } | 43 } |
OLD | NEW |