| Index: ios/chrome/browser/translate/translate_service_ios_unittest.cc
|
| diff --git a/ios/chrome/browser/translate/translate_service_ios_unittest.cc b/ios/chrome/browser/translate/translate_service_ios_unittest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0cbd6b00331eec8d25561c8966e75a8e9a24c5b5
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/translate/translate_service_ios_unittest.cc
|
| @@ -0,0 +1,27 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ios/chrome/browser/translate/translate_service_ios.h"
|
| +
|
| +#include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
|
| +#include "ios/public/test/test_chrome_provider_initializer.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +#include "url/gurl.h"
|
| +
|
| +TEST(TranslateServiceIOSTest, CheckTranslatableURL) {
|
| + // TODO(droger): Remove this once http://crbug.com/437332 is fixed.
|
| + ios::TestChromeProviderInitializer test_chrome_provider_initializer;
|
| +
|
| + GURL empty_url = GURL(std::string());
|
| + EXPECT_FALSE(TranslateServiceIOS::IsTranslatableURL(empty_url));
|
| +
|
| + std::string chrome =
|
| + std::string(ios::GetChromeBrowserProvider()->GetChromeUIScheme()) +
|
| + "://flags";
|
| + GURL chrome_url = GURL(chrome);
|
| + EXPECT_FALSE(TranslateServiceIOS::IsTranslatableURL(chrome_url));
|
| +
|
| + GURL right_url = GURL("http://www.tamurayukari.com/");
|
| + EXPECT_TRUE(TranslateServiceIOS::IsTranslatableURL(right_url));
|
| +}
|
|
|