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

Side by Side Diff: content/renderer/render_frame_impl_browsertest.cc

Issue 2881593002: Reporting: Plumb into RenderFrame via Mojo (Closed)
Patch Set: rebase Created 3 years, 6 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/leak_annotations.h" 8 #include "base/debug/leak_annotations.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "base/values.h"
11 #include "build/build_config.h" 12 #include "build/build_config.h"
12 #include "content/child/web_url_loader_impl.h" 13 #include "content/child/web_url_loader_impl.h"
13 #include "content/common/frame_messages.h" 14 #include "content/common/frame_messages.h"
14 #include "content/common/frame_owner_properties.h" 15 #include "content/common/frame_owner_properties.h"
15 #include "content/common/renderer.mojom.h" 16 #include "content/common/renderer.mojom.h"
16 #include "content/common/view_messages.h" 17 #include "content/common/view_messages.h"
17 #include "content/public/common/previews_state.h" 18 #include "content/public/common/previews_state.h"
18 #include "content/public/renderer/document_state.h" 19 #include "content/public/renderer/document_state.h"
19 #include "content/public/test/frame_load_waiter.h" 20 #include "content/public/test/frame_load_waiter.h"
20 #include "content/public/test/render_view_test.h" 21 #include "content/public/test/render_view_test.h"
21 #include "content/public/test/test_utils.h" 22 #include "content/public/test/test_utils.h"
22 #include "content/renderer/navigation_state_impl.h" 23 #include "content/renderer/navigation_state_impl.h"
23 #include "content/renderer/render_frame_impl.h" 24 #include "content/renderer/render_frame_impl.h"
24 #include "content/renderer/render_view_impl.h" 25 #include "content/renderer/render_view_impl.h"
25 #include "content/test/fake_compositor_dependencies.h" 26 #include "content/test/fake_compositor_dependencies.h"
26 #include "testing/gtest/include/gtest/gtest.h" 27 #include "testing/gtest/include/gtest/gtest.h"
27 #include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h" 28 #include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h"
28 #include "third_party/WebKit/public/platform/WebString.h" 29 #include "third_party/WebKit/public/platform/WebString.h"
29 #include "third_party/WebKit/public/platform/WebURL.h" 30 #include "third_party/WebKit/public/platform/WebURL.h"
30 #include "third_party/WebKit/public/platform/WebURLRequest.h" 31 #include "third_party/WebKit/public/platform/WebURLRequest.h"
31 #include "third_party/WebKit/public/web/WebHistoryItem.h" 32 #include "third_party/WebKit/public/web/WebHistoryItem.h"
32 #include "third_party/WebKit/public/web/WebLocalFrame.h" 33 #include "third_party/WebKit/public/web/WebLocalFrame.h"
33 #include "third_party/WebKit/public/web/WebView.h" 34 #include "third_party/WebKit/public/web/WebView.h"
35 #include "url/gurl.h"
34 36
35 using blink::WebString; 37 using blink::WebString;
36 using blink::WebURLRequest; 38 using blink::WebURLRequest;
37 39
38 namespace { 40 namespace {
39 const int32_t kSubframeRouteId = 20; 41 const int32_t kSubframeRouteId = 20;
40 const int32_t kSubframeWidgetRouteId = 21; 42 const int32_t kSubframeWidgetRouteId = 21;
41 const int32_t kFrameProxyRouteId = 22; 43 const int32_t kFrameProxyRouteId = 22;
42 } // namespace 44 } // namespace
43 45
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 request.SetURL( 542 request.SetURL(
541 GURL(test.is_https ? "https://example.com" : "http://example.com")); 543 GURL(test.is_https ? "https://example.com" : "http://example.com"));
542 request.SetPreviewsState(test.initial_request_previews_state); 544 request.SetPreviewsState(test.initial_request_previews_state);
543 545
544 EXPECT_EQ(test.expected_should_use_client_lo_fi_for_request, 546 EXPECT_EQ(test.expected_should_use_client_lo_fi_for_request,
545 frame()->ShouldUseClientLoFiForRequest(request)) 547 frame()->ShouldUseClientLoFiForRequest(request))
546 << (&test - tests); 548 << (&test - tests);
547 } 549 }
548 } 550 }
549 551
552 TEST_F(RenderFrameImplTest, ReportingSmokeTest) {
553 frame()->QueueReport(GURL("https://example.com/path"), "example-group",
jam 2017/06/05 21:03:44 what is this test testing, that no crashes occur?
Julia Tuttle 2017/06/15 20:33:32 Yeah, this was just to check for crashes. I'll ho
554 "example-type",
555 base::MakeUnique<base::DictionaryValue>());
556 }
557
550 } // namespace content 558 } // namespace content
OLDNEW
« content/renderer/render_frame_impl.cc ('K') | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698