| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.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 "base/utf_string_conversions.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL( | 229 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL( |
| 230 browser(), GURL(input_file_source))); | 230 browser(), GURL(input_file_source))); |
| 231 | 231 |
| 232 ASSERT_NO_FATAL_FAILURE(ui_test_utils::ClickOnView(browser(), | 232 ASSERT_NO_FATAL_FAILURE(ui_test_utils::ClickOnView(browser(), |
| 233 VIEW_ID_TAB_CONTAINER)); | 233 VIEW_ID_TAB_CONTAINER)); |
| 234 ASSERT_TRUE(ui_test_utils::IsViewFocused( | 234 ASSERT_TRUE(ui_test_utils::IsViewFocused( |
| 235 browser(), | 235 browser(), |
| 236 VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); | 236 VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); |
| 237 | 237 |
| 238 AutoFillManager* autofill_manager = | 238 AutoFillManager* autofill_manager = |
| 239 browser()->GetSelectedTabContents()->autofill_manager(); | 239 browser()->GetSelectedTabContents()->autofill_manager_; |
| 240 ASSERT_NE(static_cast<AutoFillManager*>(NULL), autofill_manager); | 240 ASSERT_NE(static_cast<AutoFillManager*>(NULL), autofill_manager); |
| 241 std::vector<FormStructure*> forms = GetFormStructures(*autofill_manager); | 241 std::vector<FormStructure*> forms = GetFormStructures(*autofill_manager); |
| 242 | 242 |
| 243 FilePath output_file_directory = GetOutputFileDirectory(); | 243 FilePath output_file_directory = GetOutputFileDirectory(); |
| 244 FilePath output_file_path = output_file_directory.Append( | 244 FilePath output_file_path = output_file_directory.Append( |
| 245 input_file_path.BaseName().StripTrailingSeparators().ReplaceExtension( | 245 input_file_path.BaseName().StripTrailingSeparators().ReplaceExtension( |
| 246 FILE_PATH_LITERAL(".out"))); | 246 FILE_PATH_LITERAL(".out"))); |
| 247 | 247 |
| 248 std::string output_file_source; | 248 std::string output_file_source; |
| 249 if (file_util::ReadFileToString(output_file_path, &output_file_source)) { | 249 if (file_util::ReadFileToString(output_file_path, &output_file_source)) { |
| 250 ASSERT_EQ(NormalizeText(output_file_source), | 250 ASSERT_EQ(NormalizeText(output_file_source), |
| 251 NormalizeText( | 251 NormalizeText( |
| 252 FormStructureBrowserTest::FormStructuresToString(forms))); | 252 FormStructureBrowserTest::FormStructuresToString(forms))); |
| 253 | 253 |
| 254 } else { | 254 } else { |
| 255 ASSERT_TRUE(WriteFile( | 255 ASSERT_TRUE(WriteFile( |
| 256 output_file_path, | 256 output_file_path, |
| 257 FormStructureBrowserTest::FormStructuresToString(forms))); | 257 FormStructureBrowserTest::FormStructuresToString(forms))); |
| 258 } | 258 } |
| 259 } | 259 } |
| 260 } | 260 } |
| OLD | NEW |