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

Side by Side Diff: content/common/page_state_serialization_unittest.cc

Issue 649533003: C++11 declares a type safe null pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Presubmit errors Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « content/common/page_state_serialization.cc ('k') | content/common/plugin_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <math.h> 5 #include <math.h>
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/pickle.h" 10 #include "base/pickle.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 //----------------------------------------------------------------------------- 89 //-----------------------------------------------------------------------------
90 90
91 class PageStateSerializationTest : public testing::Test { 91 class PageStateSerializationTest : public testing::Test {
92 public: 92 public:
93 void PopulateFrameState(ExplodedFrameState* frame_state) { 93 void PopulateFrameState(ExplodedFrameState* frame_state) {
94 // Invent some data for the various fields. 94 // Invent some data for the various fields.
95 frame_state->url_string = NS16("http://dev.chromium.org/"); 95 frame_state->url_string = NS16("http://dev.chromium.org/");
96 frame_state->referrer = NS16("https://www.google.com/search?q=dev.chromium.o rg"); 96 frame_state->referrer = NS16("https://www.google.com/search?q=dev.chromium.o rg");
97 frame_state->referrer_policy = blink::WebReferrerPolicyAlways; 97 frame_state->referrer_policy = blink::WebReferrerPolicyAlways;
98 frame_state->target = NS16("foo"); 98 frame_state->target = NS16("foo");
99 frame_state->state_object = NS16(NULL); 99 frame_state->state_object = NS16(nullptr);
100 frame_state->document_state.push_back(NS16("1")); 100 frame_state->document_state.push_back(NS16("1"));
101 frame_state->document_state.push_back(NS16("q")); 101 frame_state->document_state.push_back(NS16("q"));
102 frame_state->document_state.push_back(NS16("text")); 102 frame_state->document_state.push_back(NS16("text"));
103 frame_state->document_state.push_back(NS16("dev.chromium.org")); 103 frame_state->document_state.push_back(NS16("dev.chromium.org"));
104 frame_state->pinch_viewport_scroll_offset = gfx::PointF(10, 15); 104 frame_state->pinch_viewport_scroll_offset = gfx::PointF(10, 15);
105 frame_state->scroll_offset = gfx::Point(0, 100); 105 frame_state->scroll_offset = gfx::Point(0, 100);
106 frame_state->item_sequence_number = 1; 106 frame_state->item_sequence_number = 1;
107 frame_state->document_sequence_number = 2; 107 frame_state->document_sequence_number = 2;
108 frame_state->frame_sequence_number = 3; 108 frame_state->frame_sequence_number = 3;
109 frame_state->page_scale_factor = 2.0; 109 frame_state->page_scale_factor = 2.0;
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 TEST_F(PageStateSerializationTest, BackwardsCompat_v18) { 425 TEST_F(PageStateSerializationTest, BackwardsCompat_v18) {
426 TestBackwardsCompat(18); 426 TestBackwardsCompat(18);
427 } 427 }
428 428
429 TEST_F(PageStateSerializationTest, BackwardsCompat_v20) { 429 TEST_F(PageStateSerializationTest, BackwardsCompat_v20) {
430 TestBackwardsCompat(20); 430 TestBackwardsCompat(20);
431 } 431 }
432 432
433 } // namespace 433 } // namespace
434 } // namespace content 434 } // namespace content
OLDNEW
« no previous file with comments | « content/common/page_state_serialization.cc ('k') | content/common/plugin_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698