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

Side by Side Diff: components/web_view/frame_apptest.cc

Issue 1391963004: Correctly record and pass around navigation start time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/web_view/frame.h" 5 #include "components/web_view/frame.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 uint32_t last_dispatch_load_event_frame_id() const { 123 uint32_t last_dispatch_load_event_frame_id() const {
124 return last_dispatch_load_event_frame_id_; 124 return last_dispatch_load_event_frame_id_;
125 } 125 }
126 126
127 // mojom::FrameClient: 127 // mojom::FrameClient:
128 void OnConnect(mojom::FramePtr frame, 128 void OnConnect(mojom::FramePtr frame,
129 uint32_t change_id, 129 uint32_t change_id,
130 uint32_t view_id, 130 uint32_t view_id,
131 mojom::ViewConnectType view_connect_type, 131 mojom::ViewConnectType view_connect_type,
132 mojo::Array<mojom::FrameDataPtr> frames, 132 mojo::Array<mojom::FrameDataPtr> frames,
133 int64_t navigation_start_time_ticks,
133 const OnConnectCallback& callback) override { 134 const OnConnectCallback& callback) override {
134 connect_count_++; 135 connect_count_++;
135 connect_frames_ = frames.Pass(); 136 connect_frames_ = frames.Pass();
136 if (frame) 137 if (frame)
137 server_frame_ = frame.Pass(); 138 server_frame_ = frame.Pass();
138 callback.Run(); 139 callback.Run();
139 if (!on_connect_callback_.is_null()) 140 if (!on_connect_callback_.is_null())
140 on_connect_callback_.Run(); 141 on_connect_callback_.Run();
141 } 142 }
142 void OnFrameAdded(uint32_t change_id, mojom::FrameDataPtr frame) override { 143 void OnFrameAdded(uint32_t change_id, mojom::FrameDataPtr frame) override {
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 child_view_and_frame->server_frame()->DispatchLoadEventToParent(); 523 child_view_and_frame->server_frame()->DispatchLoadEventToParent();
523 524
524 run_loop.Run(); 525 run_loop.Run();
525 526
526 uint32_t frame_id = root_view_and_frame() 527 uint32_t frame_id = root_view_and_frame()
527 ->test_frame_client() 528 ->test_frame_client()
528 ->last_dispatch_load_event_frame_id(); 529 ->last_dispatch_load_event_frame_id();
529 EXPECT_EQ(child_frame_id, frame_id); 530 EXPECT_EQ(child_frame_id, frame_id);
530 } 531 }
531 } // namespace web_view 532 } // namespace web_view
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698