| OLD | NEW |
| 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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 FilePath::FromWStringHack(chrome::kBrowserProcessExecutablePath)); | 717 FilePath::FromWStringHack(chrome::kBrowserProcessExecutablePath)); |
| 718 CommandLine command_line(command); | 718 CommandLine command_line(command); |
| 719 | 719 |
| 720 // Add any explicit command line flags passed to the process. | 720 // Add any explicit command line flags passed to the process. |
| 721 CommandLine::StringType extra_chrome_flags = | 721 CommandLine::StringType extra_chrome_flags = |
| 722 CommandLine::ForCurrentProcess()->GetSwitchValueNative( | 722 CommandLine::ForCurrentProcess()->GetSwitchValueNative( |
| 723 switches::kExtraChromeFlags); | 723 switches::kExtraChromeFlags); |
| 724 if (!extra_chrome_flags.empty()) { | 724 if (!extra_chrome_flags.empty()) { |
| 725 // Split by spaces and append to command line | 725 // Split by spaces and append to command line |
| 726 std::vector<CommandLine::StringType> flags; | 726 std::vector<CommandLine::StringType> flags; |
| 727 SplitString(extra_chrome_flags, ' ', &flags); | 727 base::SplitString(extra_chrome_flags, ' ', &flags); |
| 728 for (size_t i = 0; i < flags.size(); ++i) | 728 for (size_t i = 0; i < flags.size(); ++i) |
| 729 command_line.AppendArgNative(flags[i]); | 729 command_line.AppendArgNative(flags[i]); |
| 730 } | 730 } |
| 731 | 731 |
| 732 // No default browser check, it would create an info-bar (if we are not the | 732 // No default browser check, it would create an info-bar (if we are not the |
| 733 // default browser) that could conflicts with some tests expectations. | 733 // default browser) that could conflicts with some tests expectations. |
| 734 command_line.AppendSwitch(switches::kNoDefaultBrowserCheck); | 734 command_line.AppendSwitch(switches::kNoDefaultBrowserCheck); |
| 735 | 735 |
| 736 // This is a UI test. | 736 // This is a UI test. |
| 737 command_line.AppendSwitchASCII(switches::kTestType, kUITestType); | 737 command_line.AppendSwitchASCII(switches::kTestType, kUITestType); |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |