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_util.h" | 6 #include "base/file_util.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
297 std::string base_url = std::string("files/"); | 297 std::string base_url = std::string("files/"); |
298 | 298 |
299 file_util::FileEnumerator file_enumerator( | 299 file_util::FileEnumerator file_enumerator( |
300 ui_test_utils::GetTestFilePath(GetPDFTestDir(), FilePath()), | 300 ui_test_utils::GetTestFilePath(GetPDFTestDir(), FilePath()), |
301 false, | 301 false, |
302 file_util::FileEnumerator::FILES, | 302 file_util::FileEnumerator::FILES, |
303 FILE_PATH_LITERAL("*.pdf")); | 303 FILE_PATH_LITERAL("*.pdf")); |
304 for (FilePath file_path = file_enumerator.Next(); | 304 for (FilePath file_path = file_enumerator.Next(); |
305 !file_path.empty(); | 305 !file_path.empty(); |
306 file_path = file_enumerator.Next()) { | 306 file_path = file_enumerator.Next()) { |
307 std::string filename = WideToASCII(file_path.BaseName().ToWStringHack()); | 307 std::string filename = |
308 UTF16ToASCII(file_path.BaseName().LossyDisplayName()); | |
Mark Mentovai
2011/02/01 22:54:55
To ASCII? Hmm.
| |
308 | 309 |
309 #if defined(OS_MACOSX) || defined(OS_LINUX) | 310 #if defined(OS_MACOSX) || defined(OS_LINUX) |
310 if (filename == "sample.pdf") | 311 if (filename == "sample.pdf") |
311 continue; // Crashes on Mac and Linux. http://crbug.com/63549 | 312 continue; // Crashes on Mac and Linux. http://crbug.com/63549 |
312 #endif | 313 #endif |
313 | 314 |
314 LOG(WARNING) << "PDFBrowserTest.Loading: " << filename; | 315 LOG(WARNING) << "PDFBrowserTest.Loading: " << filename; |
315 | 316 |
316 GURL url = pdf_test_server()->GetURL(base_url + filename); | 317 GURL url = pdf_test_server()->GetURL(base_url + filename); |
317 ui_test_utils::NavigateToURL(browser(), url); | 318 ui_test_utils::NavigateToURL(browser(), url); |
(...skipping 15 matching lines...) Expand all Loading... | |
333 // Check if the LOAD_STOP notification could have come while we run a | 334 // Check if the LOAD_STOP notification could have come while we run a |
334 // nested message loop for the JS call. | 335 // nested message loop for the JS call. |
335 if (last_count != load_stop_notification_count()) | 336 if (last_count != load_stop_notification_count()) |
336 continue; | 337 continue; |
337 ui_test_utils::WaitForLoadStop(controller); | 338 ui_test_utils::WaitForLoadStop(controller); |
338 } | 339 } |
339 } | 340 } |
340 } | 341 } |
341 | 342 |
342 } // namespace | 343 } // namespace |
OLD | NEW |