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

Side by Side Diff: chrome/test/base/tracing_browsertest.cc

Issue 2565293003: Fix timeout in TracingBrowserTest.TestMemoryInfra (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/test/base/tracing.h" 5 #include "chrome/test/base/tracing.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // Create and destroy renderers while tracing is enabled. 57 // Create and destroy renderers while tracing is enabled.
58 GURL url2("chrome://credits"); 58 GURL url2("chrome://credits");
59 ui_test_utils::NavigateToURLWithDisposition( 59 ui_test_utils::NavigateToURLWithDisposition(
60 browser(), url2, WindowOpenDisposition::NEW_FOREGROUND_TAB, 60 browser(), url2, WindowOpenDisposition::NEW_FOREGROUND_TAB,
61 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 61 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
62 ASSERT_NO_FATAL_FAILURE(ExecuteJavascriptOnCurrentTab()); 62 ASSERT_NO_FATAL_FAILURE(ExecuteJavascriptOnCurrentTab());
63 63
64 // Close the current tab. 64 // Close the current tab.
65 browser()->tab_strip_model()->CloseSelectedTabs(); 65 browser()->tab_strip_model()->CloseSelectedTabs();
66 66
67 GURL url3("chrome://settings"); 67 GURL url3("chrome://chrome-urls");
68 ui_test_utils::NavigateToURLWithDisposition( 68 ui_test_utils::NavigateToURLWithDisposition(
69 browser(), url3, WindowOpenDisposition::CURRENT_TAB, 69 browser(), url3, WindowOpenDisposition::CURRENT_TAB,
70 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 70 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
71 ASSERT_NO_FATAL_FAILURE(ExecuteJavascriptOnCurrentTab()); 71 ASSERT_NO_FATAL_FAILURE(ExecuteJavascriptOnCurrentTab());
72 72
73 std::string json_events; 73 std::string json_events;
74 ASSERT_TRUE(EndTracing(&json_events)); 74 ASSERT_TRUE(EndTracing(&json_events));
75 75
76 // Expect the basic memory dumps to be present in the trace. 76 // Expect the basic memory dumps to be present in the trace.
77 EXPECT_NE(std::string::npos, json_events.find("process_totals")); 77 EXPECT_NE(std::string::npos, json_events.find("process_totals"));
78 EXPECT_NE(std::string::npos, json_events.find("v8")); 78 EXPECT_NE(std::string::npos, json_events.find("v8"));
79 EXPECT_NE(std::string::npos, json_events.find("blink_gc")); 79 EXPECT_NE(std::string::npos, json_events.find("blink_gc"));
80 } 80 }
81 }; 81 };
82 82
83 IN_PROC_BROWSER_TEST_F(TracingBrowserTest, TestMemoryInfra) { 83 IN_PROC_BROWSER_TEST_F(TracingBrowserTest, TestMemoryInfra) {
84 PerformDumpMemoryTestActions(base::trace_event::TraceConfig( 84 PerformDumpMemoryTestActions(base::trace_event::TraceConfig(
85 base::trace_event::TraceConfigMemoryTestUtil:: 85 base::trace_event::TraceConfigMemoryTestUtil::
86 GetTraceConfig_PeriodicTriggers(250, 2000))); 86 GetTraceConfig_PeriodicTriggers(250, 2000)));
87 } 87 }
88 88
89 IN_PROC_BROWSER_TEST_F(TracingBrowserTest, TestBackgroundMemoryInfra) { 89 IN_PROC_BROWSER_TEST_F(TracingBrowserTest, TestBackgroundMemoryInfra) {
90 PerformDumpMemoryTestActions(base::trace_event::TraceConfig( 90 PerformDumpMemoryTestActions(base::trace_event::TraceConfig(
91 base::trace_event::TraceConfigMemoryTestUtil:: 91 base::trace_event::TraceConfigMemoryTestUtil::
92 GetTraceConfig_BackgroundTrigger(200))); 92 GetTraceConfig_BackgroundTrigger(200)));
93 } 93 }
94 94
95 } // namespace 95 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698