| OLD | NEW |
| 1 // Copyright (C) 2013 Google Inc. | 1 // Copyright (C) 2013 Google Inc. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 #include <gtest/gtest.h> | 23 #include <gtest/gtest.h> |
| 24 | 24 |
| 25 #include "fake_downloader.h" | 25 #include "fake_downloader.h" |
| 26 #include "fake_storage.h" | 26 #include "fake_storage.h" |
| 27 #include "region_data_constants.h" | 27 #include "region_data_constants.h" |
| 28 | 28 |
| 29 namespace i18n { | 29 namespace i18n { |
| 30 namespace addressinput { | 30 namespace addressinput { |
| 31 | 31 |
| 32 const char kKey[] = "data/CA/AB--fr"; | 32 const char kKey[] = "data/CA"; |
| 33 | 33 |
| 34 // Empty data that the downloader can return. | 34 // Empty data that the downloader can return. |
| 35 const char kEmptyData[] = "{}"; | 35 const char kEmptyData[] = "{}"; |
| 36 | 36 |
| 37 // Tests for Retriever object. | 37 // Tests for Retriever object. |
| 38 class RetrieverTest : public testing::Test { | 38 class RetrieverTest : public testing::Test { |
| 39 protected: | 39 protected: |
| 40 RetrieverTest() | 40 RetrieverTest() |
| 41 : success_(false), | 41 : success_(false), |
| 42 key_(), | 42 key_(), |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 EXPECT_EQ("", GetKeyForUrl("http://www.google.com/")); | 184 EXPECT_EQ("", GetKeyForUrl("http://www.google.com/")); |
| 185 EXPECT_EQ("", GetKeyForUrl("")); | 185 EXPECT_EQ("", GetKeyForUrl("")); |
| 186 EXPECT_EQ("", GetKeyForUrl("test:///")); | 186 EXPECT_EQ("", GetKeyForUrl("test:///")); |
| 187 EXPECT_EQ("data", GetKeyForUrl("test:///data")); | 187 EXPECT_EQ("data", GetKeyForUrl("test:///data")); |
| 188 EXPECT_EQ("data/US", GetKeyForUrl("test:///data/US")); | 188 EXPECT_EQ("data/US", GetKeyForUrl("test:///data/US")); |
| 189 EXPECT_EQ("data/CA--fr", GetKeyForUrl("test:///data/CA--fr")); | 189 EXPECT_EQ("data/CA--fr", GetKeyForUrl("test:///data/CA--fr")); |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace addressinput | 192 } // namespace addressinput |
| 193 } // namespace i18n | 193 } // namespace i18n |
| OLD | NEW |