Index: chrome/renderer/page_load_metrics/fake_page_timing_sender.cc |
diff --git a/chrome/renderer/page_load_metrics/fake_page_timing_sender.cc b/chrome/renderer/page_load_metrics/fake_page_timing_sender.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6ac160502c72d26496d99d28e65e456d22530dd5 |
--- /dev/null |
+++ b/chrome/renderer/page_load_metrics/fake_page_timing_sender.cc |
@@ -0,0 +1,23 @@ |
+// Copyright 2017 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. |
+ |
+#include "chrome/renderer/page_load_metrics/fake_page_timing_sender.h" |
+ |
+#include "base/run_loop.h" |
+#include "testing/gtest/include/gtest/gtest.h" |
+ |
+namespace page_load_metrics { |
+ |
+FakePageTimingSender::FakePageTimingSender() {} |
+ |
+FakePageTimingSender::~FakePageTimingSender() {} |
+ |
+void FakePageTimingSender::SendTiming(const PageLoadTiming& timing, |
+ const PageLoadMetadata& metadata) { |
+ ASSERT_TRUE(page_load_metrics_ptr_); |
+ page_load_metrics_ptr_->UpdateTiming(timing, metadata); |
+ base::RunLoop().RunUntilIdle(); |
+} |
+ |
+} // namespace page_load_metrics |