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

Unified Diff: components/sessions/serialized_navigation_entry_test_helper.h

Issue 14497003: Moves TabNavigation into components/sessions and renames (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really remove webkit_support 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 side-by-side diff with in-line comments
Download patch
Index: components/sessions/serialized_navigation_entry_test_helper.h
diff --git a/components/sessions/serialized_navigation_entry_test_helper.h b/components/sessions/serialized_navigation_entry_test_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..43b49eb9da4ebcbee0c3150d18574f3143010ca8
--- /dev/null
+++ b/components/sessions/serialized_navigation_entry_test_helper.h
@@ -0,0 +1,62 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SESSIONS_SESSION_TYPES_TEST_HELPER_H_
+#define COMPONENTS_SESSIONS_SESSION_TYPES_TEST_HELPER_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "content/public/common/page_transition_types.h"
+
+class GURL;
+
+namespace base {
+class Time;
+}
+
+namespace content {
+struct Referrer;
+}
+
+namespace sessions {
+
+class SerializedNavigationEntry;
+
+// Set of test functions to manipulate a SerializedNavigationEntry.
+class SerializedNavigationEntryTestHelper {
+ public:
+ // Compares the two entries. This uses EXPECT_XXX on each member, if your test
+ // needs to stop after this wrap calls to this in EXPECT_NO_FATAL_FAILURE.
+ static void ExpectNavigationEquals(const SerializedNavigationEntry& expected,
+ const SerializedNavigationEntry& actual);
+
+ // Create a SerializedNavigationEntry with the given URL and title and some
+ // common values for the other fields.
+ static SerializedNavigationEntry CreateNavigation(
+ const std::string& virtual_url,
+ const std::string& title);
+
+ static void SetContentState(const std::string& content_state,
+ SerializedNavigationEntry* navigation);
+
+ static void SetHasPostData(bool has_post_data,
+ SerializedNavigationEntry* navigation);
+
+ static void SetOriginalRequestURL(const GURL& original_request_url,
+ SerializedNavigationEntry* navigation);
+
+ static void SetIsOverridingUserAgent(bool is_overriding_user_agent,
+ SerializedNavigationEntry* navigation);
+
+ static void SetTimestamp(base::Time timestamp,
+ SerializedNavigationEntry* navigation);
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(SerializedNavigationEntryTestHelper);
+};
+
+} // sessions
+
+#endif // COMPONENTS_SESSIONS_SESSION_TYPES_TEST_HELPER_H_
« no previous file with comments | « components/sessions/serialized_navigation_entry.cc ('k') | components/sessions/serialized_navigation_entry_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698