OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 const TimingDeltas load_timing_deltas_; | 261 const TimingDeltas load_timing_deltas_; |
262 | 262 |
263 DISALLOW_COPY_AND_ASSIGN(TestInterceptor); | 263 DISALLOW_COPY_AND_ASSIGN(TestInterceptor); |
264 }; | 264 }; |
265 | 265 |
266 class LoadTimingBrowserTest : public InProcessBrowserTest { | 266 class LoadTimingBrowserTest : public InProcessBrowserTest { |
267 public: | 267 public: |
268 LoadTimingBrowserTest() { | 268 LoadTimingBrowserTest() { |
269 } | 269 } |
270 | 270 |
271 virtual ~LoadTimingBrowserTest() { | 271 ~LoadTimingBrowserTest() override {} |
272 } | |
273 | 272 |
274 // Navigates to |url| and writes the resulting navigation timings to | 273 // Navigates to |url| and writes the resulting navigation timings to |
275 // |navigation_deltas|. | 274 // |navigation_deltas|. |
276 void RunTestWithUrl(const GURL& url, TimingDeltas* navigation_deltas) { | 275 void RunTestWithUrl(const GURL& url, TimingDeltas* navigation_deltas) { |
277 ui_test_utils::NavigateToURL(browser(), url); | 276 ui_test_utils::NavigateToURL(browser(), url); |
278 GetResultDeltas(navigation_deltas); | 277 GetResultDeltas(navigation_deltas); |
279 } | 278 } |
280 | 279 |
281 // Navigates to a url that returns the timings indicated by | 280 // Navigates to a url that returns the timings indicated by |
282 // |load_timing_deltas| and writes the resulting navigation timings to | 281 // |load_timing_deltas| and writes the resulting navigation timings to |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 navigation_deltas.send_start.GetDelta()); | 587 navigation_deltas.send_start.GetDelta()); |
589 // The only times that are guaranteed to be distinct are send_start and | 588 // The only times that are guaranteed to be distinct are send_start and |
590 // received_headers_end. | 589 // received_headers_end. |
591 EXPECT_LT(navigation_deltas.send_start.GetDelta(), | 590 EXPECT_LT(navigation_deltas.send_start.GetDelta(), |
592 navigation_deltas.receive_headers_end.GetDelta()); | 591 navigation_deltas.receive_headers_end.GetDelta()); |
593 | 592 |
594 EXPECT_TRUE(navigation_deltas.ssl_start.is_null()); | 593 EXPECT_TRUE(navigation_deltas.ssl_start.is_null()); |
595 } | 594 } |
596 | 595 |
597 } // namespace | 596 } // namespace |
OLD | NEW |