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

Side by Side Diff: android_webview/native/state_serializer_unittests.cc

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "android_webview/native/state_serializer.h" 5 #include "android_webview/native/state_serializer.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/pickle.h" 10 #include "base/pickle.h"
(...skipping 15 matching lines...) Expand all
26 EXPECT_TRUE(result); 26 EXPECT_TRUE(result);
27 27
28 PickleIterator iterator(pickle); 28 PickleIterator iterator(pickle);
29 result = internal::RestoreHeaderFromPickle(&iterator); 29 result = internal::RestoreHeaderFromPickle(&iterator);
30 EXPECT_TRUE(result); 30 EXPECT_TRUE(result);
31 } 31 }
32 32
33 TEST(AndroidWebViewStateSerializerTest, TestNavigationEntrySerialization) { 33 TEST(AndroidWebViewStateSerializerTest, TestNavigationEntrySerialization) {
34 // This is required for NavigationEntry::Create. 34 // This is required for NavigationEntry::Create.
35 content::ContentClient content_client; 35 content::ContentClient content_client;
36 content::SetContentClient(&content_client);
36 content::ContentBrowserClient browser_client; 37 content::ContentBrowserClient browser_client;
37 content_client.set_browser_for_testing(&browser_client); 38 content::SetBrowserClientForTesting(&browser_client);
38 content::SetContentClient(&content_client);
39 39
40 scoped_ptr<content::NavigationEntry> entry( 40 scoped_ptr<content::NavigationEntry> entry(
41 content::NavigationEntry::Create()); 41 content::NavigationEntry::Create());
42 42
43 const GURL url("http://url"); 43 const GURL url("http://url");
44 const GURL virtual_url("http://virtual_url"); 44 const GURL virtual_url("http://virtual_url");
45 content::Referrer referrer; 45 content::Referrer referrer;
46 referrer.url = GURL("http://referrer_url"); 46 referrer.url = GURL("http://referrer_url");
47 referrer.policy = WebKit::WebReferrerPolicyOrigin; 47 referrer.policy = WebKit::WebReferrerPolicyOrigin;
48 const string16 title(UTF8ToUTF16("title")); 48 const string16 title(UTF8ToUTF16("title"));
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 EXPECT_EQ(title, copy->GetTitle()); 80 EXPECT_EQ(title, copy->GetTitle());
81 EXPECT_EQ(content_state, copy->GetContentState()); 81 EXPECT_EQ(content_state, copy->GetContentState());
82 EXPECT_EQ(has_post_data, copy->GetHasPostData()); 82 EXPECT_EQ(has_post_data, copy->GetHasPostData());
83 EXPECT_EQ(original_request_url, copy->GetOriginalRequestURL()); 83 EXPECT_EQ(original_request_url, copy->GetOriginalRequestURL());
84 EXPECT_EQ(base_url_for_data_url, copy->GetBaseURLForDataURL()); 84 EXPECT_EQ(base_url_for_data_url, copy->GetBaseURLForDataURL());
85 EXPECT_EQ(is_overriding_user_agent, copy->GetIsOverridingUserAgent()); 85 EXPECT_EQ(is_overriding_user_agent, copy->GetIsOverridingUserAgent());
86 EXPECT_EQ(timestamp, copy->GetTimestamp()); 86 EXPECT_EQ(timestamp, copy->GetTimestamp());
87 } 87 }
88 88
89 } // namespace android_webview 89 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_quota_manager_bridge_impl.cc ('k') | chrome/browser/autofill/risk/fingerprint_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698