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

Side by Side Diff: content/browser/media/webrtc_internals_browsertest.cc

Issue 14880002: Fixes a memory leak when running webrtc-internals for a long time, by using a circular buffer of si… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix merge conflict Created 7 years, 7 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
« no previous file with comments | « no previous file | content/browser/resources/media/data_series.js » ('j') | 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) 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/time.h" 6 #include "base/time.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 #include "content/public/test/browser_test_utils.h" 9 #include "content/public/test/browser_test_utils.h"
10 #include "content/shell/shell.h" 10 #include "content/shell/shell.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 int pid_; 107 int pid_;
108 int lid_; 108 int lid_;
109 std::vector<EventEntry> events_; 109 std::vector<EventEntry> events_;
110 // This is a record of the history of stats value reported for each stats 110 // This is a record of the history of stats value reported for each stats
111 // report id (e.g. ssrc-1234) for each stats name (e.g. framerate). 111 // report id (e.g. ssrc-1234) for each stats name (e.g. framerate).
112 // It a 2-D map with each map entry is a vector of reported values. 112 // It a 2-D map with each map entry is a vector of reported values.
113 // It is used to verify the graph data series. 113 // It is used to verify the graph data series.
114 std::map<string, StatsMap> stats_; 114 std::map<string, StatsMap> stats_;
115 }; 115 };
116 116
117 static const int64 FAKE_TIME_STAMP = 0; 117 static const int64 FAKE_TIME_STAMP = 3600000;
118 118
119 class WebRTCInternalsBrowserTest: public ContentBrowserTest { 119 class WebRTCInternalsBrowserTest: public ContentBrowserTest {
120 public: 120 public:
121 WebRTCInternalsBrowserTest() {} 121 WebRTCInternalsBrowserTest() {}
122 virtual ~WebRTCInternalsBrowserTest() {} 122 virtual ~WebRTCInternalsBrowserTest() {}
123 123
124 virtual void SetUpOnMainThread() OVERRIDE { 124 virtual void SetUpOnMainThread() OVERRIDE {
125 // We need fake devices in this test since we want to run on naked VMs. We 125 // We need fake devices in this test since we want to run on naked VMs. We
126 // assume this switch is set by default in content_browsertests. 126 // assume this switch is set by default in content_browsertests.
127 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( 127 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 "window.domAutomationController.send(result);", 581 "window.domAutomationController.send(result);",
582 &result)); 582 &result));
583 583
584 EXPECT_TRUE(result); 584 EXPECT_TRUE(result);
585 585
586 count = GetSsrcInfoBlockCount(shell2); 586 count = GetSsrcInfoBlockCount(shell2);
587 EXPECT_GT(count, 0); 587 EXPECT_GT(count, 0);
588 } 588 }
589 589
590 } // namespace content 590 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/resources/media/data_series.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698