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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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/gpu/webgl_infobar_browsertest.cc ('k') | chrome/test/ppapi/ppapi_browsertest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <mach/mach.h> 5 #include <mach/mach.h>
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 vm_deallocate(self, reinterpret_cast<vm_address_t>(names), 69 vm_deallocate(self, reinterpret_cast<vm_address_t>(names),
70 names_count * sizeof(mach_port_name_array_t)); 70 names_count * sizeof(mach_port_name_array_t));
71 vm_deallocate(self, reinterpret_cast<vm_address_t>(types), 71 vm_deallocate(self, reinterpret_cast<vm_address_t>(types),
72 types_count * sizeof(mach_port_type_array_t)); 72 types_count * sizeof(mach_port_type_array_t));
73 } 73 }
74 74
75 // Adds a tab from the page cycler data at the specified domain. 75 // Adds a tab from the page cycler data at the specified domain.
76 void AddTab(const std::string& domain) { 76 void AddTab(const std::string& domain) {
77 GURL url = server_.GetURL("files/" + domain + "/").Resolve("?skip"); 77 GURL url = server_.GetURL("files/" + domain + "/").Resolve("?skip");
78 AddTabAtIndex(0, url, content::PageTransition::PAGE_TRANSITION_TYPED); 78 AddTabAtIndex(0, url, ui::PAGE_TRANSITION_TYPED);
79 } 79 }
80 80
81 private: 81 private:
82 net::SpawnedTestServer server_; 82 net::SpawnedTestServer server_;
83 std::vector<int> port_counts_; 83 std::vector<int> port_counts_;
84 }; 84 };
85 85
86 IN_PROC_BROWSER_TEST_F(MachPortsTest, GetCounts) { 86 IN_PROC_BROWSER_TEST_F(MachPortsTest, GetCounts) {
87 browser()->window()->Show(); 87 browser()->window()->Show();
88 88
(...skipping 17 matching lines...) Expand all
106 // Close each tab, recording the number of ports after each. Do not close the 106 // Close each tab, recording the number of ports after each. Do not close the
107 // last tab, which is about:blank. 107 // last tab, which is about:blank.
108 for (int i = 0; i < tab_count - 1; ++i) { 108 for (int i = 0; i < tab_count - 1; ++i) {
109 EXPECT_TRUE( 109 EXPECT_TRUE(
110 tab_strip_model->CloseWebContentsAt(0, TabStripModel::CLOSE_NONE)); 110 tab_strip_model->CloseWebContentsAt(0, TabStripModel::CLOSE_NONE));
111 RecordPortCount(); 111 RecordPortCount();
112 } 112 }
113 } 113 }
114 114
115 } // namespace 115 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/gpu/webgl_infobar_browsertest.cc ('k') | chrome/test/ppapi/ppapi_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698