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

Unified Diff: chrome/browser/sessions/session_types_test_helper.h

Issue 10917231: Revamp TabNavigation class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac Created 8 years, 3 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
« no previous file with comments | « chrome/browser/sessions/session_types.cc ('k') | chrome/browser/sessions/session_types_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_types_test_helper.h
diff --git a/chrome/browser/sessions/session_types_test_helper.h b/chrome/browser/sessions/session_types_test_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..50eb2e3d9cbc1a2c34dafdfece5eaaea99e8f6bc
--- /dev/null
+++ b/chrome/browser/sessions/session_types_test_helper.h
@@ -0,0 +1,60 @@
+// Copyright (c) 2012 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 CHROME_BROWSER_SESSIONS_SESSION_TYPES_TEST_HELPER_H_
+#define CHROME_BROWSER_SESSIONS_SESSION_TYPES_TEST_HELPER_H_
+
+#include <string>
+
+#include "content/public/common/page_transition_types.h"
+
+class GURL;
+class TabNavigation;
+
+namespace content {
+struct Referrer;
+}
+
+struct SessionTypesTestHelper {
+ // Compares everything except index, unique ID, post ID, and
+ // timestamp.
+ static void ExpectNavigationEquals(const TabNavigation& expected,
+ const TabNavigation& actual);
+
+ // Create a TabNavigation with the given URL and title and some
+ // common values for the other fields.
+ static TabNavigation CreateNavigation(const std::string& virtual_url,
+ const std::string& title);
+
+ // Getters.
+
+ static const content::Referrer& GetReferrer(const TabNavigation& navigation);
+
+ static content::PageTransition GetTransitionType(
+ const TabNavigation& navigation);
+
+ static bool GetHasPostData(const TabNavigation& navigation);
+
+ static int64 GetPostID(const TabNavigation& navigation);
+
+ static const GURL& GetOriginalRequestURL(const TabNavigation& navigation);
+
+ static bool GetIsOverridingUserAgent(const TabNavigation& navigation);
+
+ // Setters.
+
+ static void SetContentState(TabNavigation* navigation,
+ const std::string& content_state);
+
+ static void SetHasPostData(TabNavigation* navigation,
+ bool has_post_data);
+
+ static void SetOriginalRequestURL(TabNavigation* navigation,
+ const GURL& original_request_url);
+
+ static void SetIsOverridingUserAgent(TabNavigation* navigation,
+ bool is_overriding_user_agent);
+};
+
+#endif // CHROME_BROWSER_SESSIONS_SESSION_TYPES_TEST_HELPER_H_
« no previous file with comments | « chrome/browser/sessions/session_types.cc ('k') | chrome/browser/sessions/session_types_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698