| 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 "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/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/common/chrome_paths.h" | 11 #include "chrome/common/chrome_paths.h" |
| 11 #include "chrome/test/automation/tab_proxy.h" | 12 #include "chrome/test/automation/tab_proxy.h" |
| 12 #include "chrome/test/ui/ui_test.h" | 13 #include "chrome/test/ui/ui_test.h" |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 // Provides a UI Test that lets us take the browser to a url, and | 17 // Provides a UI Test that lets us take the browser to a url, and |
| 17 // wait for a cookie value to be set before closing the page. | 18 // wait for a cookie value to be set before closing the page. |
| 18 class UrlFetchTest : public UITest { | 19 class UrlFetchTest : public UITest { |
| 19 public: | 20 public: |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 141 |
| 141 // Write out the JS Variable if requested | 142 // Write out the JS Variable if requested |
| 142 FilePath jsvar_output_path = cmd_line->GetSwitchValuePath("jsvar_output"); | 143 FilePath jsvar_output_path = cmd_line->GetSwitchValuePath("jsvar_output"); |
| 143 if (jsvar_output_path.value().size() > 0) { | 144 if (jsvar_output_path.value().size() > 0) { |
| 144 ASSERT_TRUE(WriteValueToFile(result.javascript_variable, | 145 ASSERT_TRUE(WriteValueToFile(result.javascript_variable, |
| 145 jsvar_output_path)); | 146 jsvar_output_path)); |
| 146 } | 147 } |
| 147 } | 148 } |
| 148 | 149 |
| 149 } // namespace | 150 } // namespace |
| OLD | NEW |