Commit 6ea3c2a1 authored by pavely@chromium.org's avatar pavely@chromium.org

Cleanup changes in gcm_network_channel

No functionality change, just moving things around.
- Move functions so that it is more convenient to read .cc file top to bottom.
- replace ANDROID with OS_ANDROID. Looking at other places in the code OS_ANDROID is much more popular way to check for android.

R=rlarocque@chromium.org

Review URL: https://codereview.chromium.org/217653002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260357 0039d316-1c4b-4281-b951-d872f2087c98
parent 90a98785
This diff is collapsed.
......@@ -379,19 +379,6 @@ TEST_F(GCMNetworkChannelTest, RequestTokenNeverCompletes) {
EXPECT_FALSE(delegate()->request_token_callback.is_null());
}
#if !defined(ANDROID)
TEST_F(GCMNetworkChannelTest, BuildUrl) {
GURL url = BuildUrl("registration.id");
EXPECT_TRUE(url.SchemeIsHTTPOrHTTPS());
EXPECT_FALSE(url.host().empty());
EXPECT_FALSE(url.path().empty());
std::vector<std::string> parts;
Tokenize(url.path(), "/", &parts);
std::string buffer;
EXPECT_TRUE(Base64DecodeURLSafe(parts[parts.size() - 1], &buffer));
}
#endif
TEST_F(GCMNetworkChannelTest, Base64EncodeDecode) {
std::string input;
std::string plain;
......@@ -450,7 +437,18 @@ TEST_F(GCMNetworkChannelTest, TransientError) {
EXPECT_EQ(INVALIDATIONS_ENABLED, get_last_invalidator_state());
}
#if !defined(ANDROID)
#if !defined(OS_ANDROID)
TEST_F(GCMNetworkChannelTest, BuildUrl) {
GURL url = BuildUrl("registration.id");
EXPECT_TRUE(url.SchemeIsHTTPOrHTTPS());
EXPECT_FALSE(url.host().empty());
EXPECT_FALSE(url.path().empty());
std::vector<std::string> parts;
Tokenize(url.path(), "/", &parts);
std::string buffer;
EXPECT_TRUE(Base64DecodeURLSafe(parts[parts.size() - 1], &buffer));
}
TEST_F(GCMNetworkChannelTest, EchoToken) {
url_fetcher_factory()->SetFakeResponse(GURL("http://test.url.com"),
std::string(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment