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

Unified Diff: content/common/page_state_serialization_unittest.cc

Issue 266673014: Added pinch viewport offset to page state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test Created 6 years, 7 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 | « content/common/page_state_serialization.cc ('k') | content/public/common/page_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/page_state_serialization_unittest.cc
diff --git a/content/common/page_state_serialization_unittest.cc b/content/common/page_state_serialization_unittest.cc
index c401878a16a866cb55bb164ddb8d6b5bcbf59cf5..39ff3f2c8bfcf2cc2d80f288672d1913093ba70f 100644
--- a/content/common/page_state_serialization_unittest.cc
+++ b/content/common/page_state_serialization_unittest.cc
@@ -72,6 +72,7 @@ void ExpectEquality(const ExplodedFrameState& a, const ExplodedFrameState& b) {
EXPECT_EQ(a.target, b.target);
EXPECT_EQ(a.state_object, b.state_object);
ExpectEquality(a.document_state, b.document_state);
+ EXPECT_EQ(a.pinch_viewport_scroll_offset, b.pinch_viewport_scroll_offset);
EXPECT_EQ(a.scroll_offset, b.scroll_offset);
EXPECT_EQ(a.item_sequence_number, b.item_sequence_number);
EXPECT_EQ(a.document_sequence_number, b.document_sequence_number);
@@ -100,6 +101,7 @@ class PageStateSerializationTest : public testing::Test {
frame_state->document_state.push_back(NS16("q"));
frame_state->document_state.push_back(NS16("text"));
frame_state->document_state.push_back(NS16("dev.chromium.org"));
+ frame_state->pinch_viewport_scroll_offset = gfx::PointF(10, 15);
frame_state->scroll_offset = gfx::Point(0, 100);
frame_state->item_sequence_number = 1;
frame_state->document_sequence_number = 2;
@@ -137,6 +139,7 @@ class PageStateSerializationTest : public testing::Test {
frame_state->referrer_policy = blink::WebReferrerPolicyDefault;
if (!is_child)
frame_state->target = NS16("target");
+ frame_state->pinch_viewport_scroll_offset = gfx::PointF(-1, -1);
frame_state->scroll_offset = gfx::Point(42, -42);
frame_state->item_sequence_number = 123;
frame_state->document_sequence_number = 456;
« no previous file with comments | « content/common/page_state_serialization.cc ('k') | content/public/common/page_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698