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

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

Issue 22837005: Add HTTP status code to navigation data structures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bug Created 7 years, 4 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 607b022616bc60f0225c9b75cf6a2d7b11e234a3..2028de6df8752c55b60c786c53dd5b11187da6ef 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
@@ -95,3 +95,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<sessions::SerializedNavigationEntry>::const_iterator
+ it3 = (*it2)->navigations.begin();
+ it3 != (*it2)->navigations.end(); ++it3) {
+ EXPECT_EQ(200, it3->http_status_code());
+ ++found_navigations;
+ }
+ }
+ }
+ ASSERT_EQ(1, found_navigations);
+}
« no previous file with comments | « chrome/browser/sync/glue/session_model_associator_unittest.cc ('k') | components/sessions/serialized_navigation_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698