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

Side by Side Diff: chrome/test/tab_switching/tab_switching_test.cc

Issue 192064: Hack to make tests work if out is a symlink: see if the current dir is the source root. (Closed)
Patch Set: use path.DirName().DirName() Created 11 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/page_cycler/page_cycler_test.cc ('k') | webkit/tools/test_shell/test_shell_gtk.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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/platform_thread.h" 8 #include "base/platform_thread.h"
9 #include "chrome/app/chrome_dll_resource.h" 9 #include "chrome/app/chrome_dll_resource.h"
10 #include "chrome/common/chrome_paths.h" 10 #include "chrome/common/chrome_paths.h"
(...skipping 11 matching lines...) Expand all
22 22
23 // This Automated UI test opens static files in different tabs in a proxy 23 // This Automated UI test opens static files in different tabs in a proxy
24 // browser. After all the tabs have opened, it switches between tabs, and notes 24 // browser. After all the tabs have opened, it switches between tabs, and notes
25 // time taken for each switch. It then prints out the times on the console, 25 // time taken for each switch. It then prints out the times on the console,
26 // with the aim that the page cycler parser can interpret these numbers to 26 // with the aim that the page cycler parser can interpret these numbers to
27 // draw graphs for page cycler Tab Switching Performance. 27 // draw graphs for page cycler Tab Switching Performance.
28 // Usage Flags: -enable-logging -dump-histograms-on-exit 28 // Usage Flags: -enable-logging -dump-histograms-on-exit
29 class TabSwitchingUITest : public UITest { 29 class TabSwitchingUITest : public UITest {
30 public: 30 public:
31 TabSwitchingUITest() { 31 TabSwitchingUITest() {
32 PathService::Get(base::DIR_EXE, &path_prefix_); 32 PathService::Get(base::DIR_SOURCE_ROOT, &path_prefix_);
33 path_prefix_ = path_prefix_.DirName();
34 path_prefix_ = path_prefix_.DirName();
35 path_prefix_ = path_prefix_.AppendASCII("data"); 33 path_prefix_ = path_prefix_.AppendASCII("data");
36 path_prefix_ = path_prefix_.AppendASCII("tab_switching"); 34 path_prefix_ = path_prefix_.AppendASCII("tab_switching");
37 35
38 show_window_ = true; 36 show_window_ = true;
39 } 37 }
40 38
41 void RunTabSwitchingUITest() { 39 void RunTabSwitchingUITest() {
42 // Create a browser proxy. 40 // Create a browser proxy.
43 browser_proxy_ = automation()->GetBrowserWindow(0); 41 browser_proxy_ = automation()->GetBrowserWindow(0);
44 42
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 137
140 private: 138 private:
141 DISALLOW_EVIL_CONSTRUCTORS(TabSwitchingUITest); 139 DISALLOW_EVIL_CONSTRUCTORS(TabSwitchingUITest);
142 }; 140 };
143 141
144 TEST_F(TabSwitchingUITest, GenerateTabSwitchStats) { 142 TEST_F(TabSwitchingUITest, GenerateTabSwitchStats) {
145 RunTabSwitchingUITest(); 143 RunTabSwitchingUITest();
146 } 144 }
147 145
148 } // namespace 146 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/page_cycler/page_cycler_test.cc ('k') | webkit/tools/test_shell/test_shell_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698