| 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 "ios/chrome/browser/translate/translate_service_ios.h" | 5 #include "ios/chrome/browser/translate/translate_service_ios.h" |
| 6 | 6 |
| 7 #include "ios/chrome/browser/chrome_url_constants.h" | 7 #include "ios/chrome/browser/chrome_url_constants.h" |
| 8 #include "ios/public/test/test_chrome_provider_initializer.h" | 8 #include "ios/public/provider/chrome/browser/test_chrome_provider_initializer.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
| 11 | 11 |
| 12 TEST(TranslateServiceIOSTest, CheckTranslatableURL) { | 12 TEST(TranslateServiceIOSTest, CheckTranslatableURL) { |
| 13 GURL empty_url = GURL(std::string()); | 13 GURL empty_url = GURL(std::string()); |
| 14 EXPECT_FALSE(TranslateServiceIOS::IsTranslatableURL(empty_url)); | 14 EXPECT_FALSE(TranslateServiceIOS::IsTranslatableURL(empty_url)); |
| 15 | 15 |
| 16 GURL chrome_url = GURL(kChromeUIFlagsURL); | 16 GURL chrome_url = GURL(kChromeUIFlagsURL); |
| 17 EXPECT_FALSE(TranslateServiceIOS::IsTranslatableURL(chrome_url)); | 17 EXPECT_FALSE(TranslateServiceIOS::IsTranslatableURL(chrome_url)); |
| 18 | 18 |
| 19 GURL right_url = GURL("http://www.tamurayukari.com/"); | 19 GURL right_url = GURL("http://www.tamurayukari.com/"); |
| 20 EXPECT_TRUE(TranslateServiceIOS::IsTranslatableURL(right_url)); | 20 EXPECT_TRUE(TranslateServiceIOS::IsTranslatableURL(right_url)); |
| 21 } | 21 } |
| OLD | NEW |