summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/test/integration
diff options
context:
space:
mode:
authorpvalenzuela@chromium.org <pvalenzuela@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-28 07:51:44 +0000
committerpvalenzuela@chromium.org <pvalenzuela@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-28 07:51:44 +0000
commitf49737b38742a270515974c6e20780eaf4f06fa2 (patch)
treec3b8ae39faa1ebe84bc3a99c3ab21c00960a4c9f /chrome/browser/sync/test/integration
parentc65f676922a747565ccba68a69f6d61f8fe009ca (diff)
downloadchromium_src-f49737b38742a270515974c6e20780eaf4f06fa2.zip
chromium_src-f49737b38742a270515974c6e20780eaf4f06fa2.tar.gz
chromium_src-f49737b38742a270515974c6e20780eaf4f06fa2.tar.bz2
Add HTTP status code to navigation data structures
This is a reboot of https://codereview.chromium.org/11054025/ BUG=153936,260276 Review URL: https://chromiumcodereview.appspot.com/22837005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/test/integration')
-rw-r--r--chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc28
1 files changed, 28 insertions, 0 deletions
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 607b022..2028de6 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);
+}