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

Side by Side Diff: chrome/test/ui/ui_test.cc

Issue 3823002: Move windows version-related stuff out of base/win_util and into base/win/win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #if defined(OS_POSIX) 7 #if defined(OS_POSIX)
8 #include <signal.h> 8 #include <signal.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #endif 10 #endif
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "chrome/test/automation/javascript_execution_controller.h" 43 #include "chrome/test/automation/javascript_execution_controller.h"
44 #include "chrome/test/automation/tab_proxy.h" 44 #include "chrome/test/automation/tab_proxy.h"
45 #include "chrome/test/automation/window_proxy.h" 45 #include "chrome/test/automation/window_proxy.h"
46 #include "chrome/test/chrome_process_util.h" 46 #include "chrome/test/chrome_process_util.h"
47 #include "chrome/test/test_launcher_utils.h" 47 #include "chrome/test/test_launcher_utils.h"
48 #include "chrome/test/test_switches.h" 48 #include "chrome/test/test_switches.h"
49 #include "googleurl/src/gurl.h" 49 #include "googleurl/src/gurl.h"
50 #include "net/base/net_util.h" 50 #include "net/base/net_util.h"
51 51
52 #if defined(OS_WIN) 52 #if defined(OS_WIN)
53 #include "base/win_util.h" 53 #include "base/win/windows_version.h"
54 #endif 54 #endif
55 55
56 56
57 using base::Time; 57 using base::Time;
58 using base::TimeDelta; 58 using base::TimeDelta;
59 using base::TimeTicks; 59 using base::TimeTicks;
60 60
61 // Passed as value of kTestType. 61 // Passed as value of kTestType.
62 static const char kUITestType[] = "ui"; 62 static const char kUITestType[] = "ui";
63 63
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 scoped_ptr<CommandLine> cmd_line(CreateHttpServerCommandLine()); 933 scoped_ptr<CommandLine> cmd_line(CreateHttpServerCommandLine());
934 ASSERT_TRUE(cmd_line.get()); 934 ASSERT_TRUE(cmd_line.get());
935 cmd_line->AppendSwitchASCII("server", "start"); 935 cmd_line->AppendSwitchASCII("server", "start");
936 cmd_line->AppendSwitch("register_cygwin"); 936 cmd_line->AppendSwitch("register_cygwin");
937 cmd_line->AppendSwitchPath("root", root_directory); 937 cmd_line->AppendSwitchPath("root", root_directory);
938 938
939 // For Windows 7, if we start the lighttpd server on the foreground mode, 939 // For Windows 7, if we start the lighttpd server on the foreground mode,
940 // it will mess up with the command window and cause conhost.exe to crash. To 940 // it will mess up with the command window and cause conhost.exe to crash. To
941 // work around this, we start the http server on the background mode. 941 // work around this, we start the http server on the background mode.
942 #if defined(OS_WIN) 942 #if defined(OS_WIN)
943 if (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7) 943 if (base::win::GetVersion() >= base::win::VERSION_WIN7)
944 cmd_line->AppendSwitch("run_background"); 944 cmd_line->AppendSwitch("run_background");
945 #endif 945 #endif
946 946
947 if (port) 947 if (port)
948 cmd_line->AppendSwitchASCII("port", base::IntToString(port)); 948 cmd_line->AppendSwitchASCII("port", base::IntToString(port));
949 949
950 #if defined(OS_WIN) 950 #if defined(OS_WIN)
951 // TODO(phajdan.jr): is this needed? 951 // TODO(phajdan.jr): is this needed?
952 base::LaunchAppWithHandleInheritance(cmd_line->command_line_string(), 952 base::LaunchAppWithHandleInheritance(cmd_line->command_line_string(),
953 true, 953 true,
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 std::string cookie_value; 1149 std::string cookie_value;
1150 EXPECT_TRUE(tab->GetCookieByName(url, cookie_name, &cookie_value)); 1150 EXPECT_TRUE(tab->GetCookieByName(url, cookie_name, &cookie_value));
1151 if (!cookie_value.empty()) 1151 if (!cookie_value.empty())
1152 return cookie_value; 1152 return cookie_value;
1153 } 1153 }
1154 1154
1155 ADD_FAILURE() << "Timeout reached in WaitUntilCookieNonEmpty"; 1155 ADD_FAILURE() << "Timeout reached in WaitUntilCookieNonEmpty";
1156 return std::string(); 1156 return std::string();
1157 } 1157 }
1158 1158
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698