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

Side by Side Diff: chrome/test/perf/mach_ports_test.cc

Issue 9372065: Update clients to use new TestServer constructor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove files that were reviewed and committed separately. Created 8 years, 10 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 | « chrome/test/base/in_process_browser_test.cc ('k') | chrome/test/pyautolib/pyauto.py » ('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) 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 <vector> 5 #include <vector>
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/common/automation_constants.h" 9 #include "chrome/common/automation_constants.h"
10 #include "chrome/common/automation_messages.h" 10 #include "chrome/common/automation_messages.h"
11 #include "chrome/test/automation/automation_proxy.h" 11 #include "chrome/test/automation/automation_proxy.h"
12 #include "chrome/test/automation/browser_proxy.h" 12 #include "chrome/test/automation/browser_proxy.h"
13 #include "chrome/test/automation/tab_proxy.h" 13 #include "chrome/test/automation/tab_proxy.h"
14 #include "chrome/test/automation/window_proxy.h" 14 #include "chrome/test/automation/window_proxy.h"
15 #include "chrome/test/perf/perf_test.h" 15 #include "chrome/test/perf/perf_test.h"
16 #include "chrome/test/ui/ui_perf_test.h" 16 #include "chrome/test/ui/ui_perf_test.h"
17 #include "net/test/test_server.h" 17 #include "net/test/test_server.h"
18 18
19 namespace { 19 namespace {
20 20
21 // This test spawns a new browser and counts the number of open Mach ports in 21 // This test spawns a new browser and counts the number of open Mach ports in
22 // the browser process. It navigates tabs and closes them, repeatedly measuring 22 // the browser process. It navigates tabs and closes them, repeatedly measuring
23 // the number of open ports. This is used to protect against leaking Mach ports, 23 // the number of open ports. This is used to protect against leaking Mach ports,
24 // which was the source of <http://crbug.com/105513>. 24 // which was the source of <http://crbug.com/105513>.
25 class MachPortsTest : public UIPerfTest { 25 class MachPortsTest : public UIPerfTest {
26 public: 26 public:
27 MachPortsTest() 27 MachPortsTest()
28 : server_(net::TestServer::TYPE_HTTP, 28 : server_(net::TestServer::TYPE_HTTP,
29 net::TestServer::kLocalhost,
29 FilePath(FILE_PATH_LITERAL("data/mach_ports/moz"))) { 30 FilePath(FILE_PATH_LITERAL("data/mach_ports/moz"))) {
30 } 31 }
31 32
32 virtual void SetUp() OVERRIDE { 33 virtual void SetUp() OVERRIDE {
33 UIPerfTest::SetUp(); 34 UIPerfTest::SetUp();
34 35
35 ASSERT_TRUE(server_.Start()); 36 ASSERT_TRUE(server_.Start());
36 } 37 }
37 38
38 virtual void TearDown() OVERRIDE { 39 virtual void TearDown() OVERRIDE {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 for (int i = 0; i < tab_count - 1; ++i) { 97 for (int i = 0; i < tab_count - 1; ++i) {
97 scoped_refptr<TabProxy> tab(browser->GetActiveTab()); 98 scoped_refptr<TabProxy> tab(browser->GetActiveTab());
98 ASSERT_TRUE(tab.get()); 99 ASSERT_TRUE(tab.get());
99 100
100 EXPECT_TRUE(tab->Close(true)); 101 EXPECT_TRUE(tab->Close(true));
101 RecordPortCount(); 102 RecordPortCount();
102 } 103 }
103 } 104 }
104 105
105 } // namespace 106 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/base/in_process_browser_test.cc ('k') | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698