Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Side by Side Diff: ios/chrome/browser/translate/translate_service_ios_unittest.cc

Issue 887043002: Upstream utilities for iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/chrome_url_constants.cc ('k') | ios/chrome/ios_chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/public/provider/chrome/browser/chrome_browser_provider.h" 7 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
8 #include "ios/public/test/test_chrome_provider_initializer.h" 8 #include "ios/public/test/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 // TODO(droger): Remove this once http://crbug.com/437332 is fixed.
14 ios::TestChromeProviderInitializer test_chrome_provider_initializer;
15
16 GURL empty_url = GURL(std::string()); 13 GURL empty_url = GURL(std::string());
17 EXPECT_FALSE(TranslateServiceIOS::IsTranslatableURL(empty_url)); 14 EXPECT_FALSE(TranslateServiceIOS::IsTranslatableURL(empty_url));
18 15
19 std::string chrome = 16 std::string chrome =
20 std::string(ios::GetChromeBrowserProvider()->GetChromeUIScheme()) + 17 std::string(ios::GetChromeBrowserProvider()->GetChromeUIScheme()) +
21 "://flags"; 18 "://flags";
22 GURL chrome_url = GURL(chrome); 19 GURL chrome_url = GURL(chrome);
23 EXPECT_FALSE(TranslateServiceIOS::IsTranslatableURL(chrome_url)); 20 EXPECT_FALSE(TranslateServiceIOS::IsTranslatableURL(chrome_url));
24 21
25 GURL right_url = GURL("http://www.tamurayukari.com/"); 22 GURL right_url = GURL("http://www.tamurayukari.com/");
26 EXPECT_TRUE(TranslateServiceIOS::IsTranslatableURL(right_url)); 23 EXPECT_TRUE(TranslateServiceIOS::IsTranslatableURL(right_url));
27 } 24 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/chrome_url_constants.cc ('k') | ios/chrome/ios_chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698