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

Unified Diff: chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc

Issue 11054025: [Sync] Add HTTP status codes to NavigationEntry and TabNavigation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto 11096037 Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
diff --git a/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc b/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
index 414e7f9172a4fb690e84389cd1389b78d547ee74..3e23a95c4e2fb1a25b97ae46bc0a75c58dee52c8 100644
--- a/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
@@ -96,3 +96,31 @@ IN_PROC_BROWSER_TEST_F(SingleClientSessionsSyncTest, TimestampMatchesHistory) {
}
ASSERT_EQ(1, found_navigations);
}
+
+IN_PROC_BROWSER_TEST_F(SingleClientSessionsSyncTest, ResponseCodeIsPreserved) {
+ ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
+
+ ASSERT_TRUE(CheckInitialState(0));
+
+ // We want a URL that doesn't 404 and has a non-empty title.
+ // about:version is simple to render, too.
+ const GURL url("about:version");
+
+ ScopedWindowMap windows;
+ ASSERT_TRUE(OpenTabAndGetLocalWindows(0, url, windows.GetMutable()));
+
+ int found_navigations = 0;
+ for (SessionWindowMap::const_iterator it = windows.Get()->begin();
+ it != windows.Get()->end(); ++it) {
+ for (std::vector<SessionTab*>::const_iterator it2 =
+ it->second->tabs.begin(); it2 != it->second->tabs.end(); ++it2) {
+ for (std::vector<TabNavigation>::const_iterator it3 =
+ (*it2)->navigations.begin();
+ it3 != (*it2)->navigations.end(); ++it3) {
+ EXPECT_EQ(200, SessionTypesTestHelper::GetHttpStatusCode(*it3));
+ ++found_navigations;
+ }
+ }
+ }
+ ASSERT_EQ(1, found_navigations);
+}
« no previous file with comments | « chrome/browser/sync/glue/session_model_associator_unittest.cc ('k') | content/browser/renderer_host/test_render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698