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

Side by Side Diff: chrome/test/plugin/pdf_browsertest.cc

Issue 5121006: Don't load "sample.pdf" on Mac now since it's a known crash. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "app/clipboard/clipboard.h" 5 #include "app/clipboard/clipboard.h"
6 #include "base/command_line.h" 6 #include "base/command_line.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_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 file_util::FileEnumerator file_enumerator( 294 file_util::FileEnumerator file_enumerator(
295 ui_test_utils::GetTestFilePath(GetPDFTestDir(), FilePath()), 295 ui_test_utils::GetTestFilePath(GetPDFTestDir(), FilePath()),
296 false, 296 false,
297 file_util::FileEnumerator::FILES, 297 file_util::FileEnumerator::FILES,
298 FILE_PATH_LITERAL("*.pdf")); 298 FILE_PATH_LITERAL("*.pdf"));
299 for (FilePath file_path = file_enumerator.Next(); 299 for (FilePath file_path = file_enumerator.Next();
300 !file_path.empty(); 300 !file_path.empty();
301 file_path = file_enumerator.Next()) { 301 file_path = file_enumerator.Next()) {
302 std::string filename = WideToASCII(file_path.BaseName().ToWStringHack()); 302 std::string filename = WideToASCII(file_path.BaseName().ToWStringHack());
303
304 #if defined(OS_MACOSX)
305 if (filename == "sample.pdf")
306 continue; // Crashes on Mac. http://crbug.com/63549
307 #endif
308
303 LOG(WARNING) << "PDFBrowserTest.Loading: " << filename; 309 LOG(WARNING) << "PDFBrowserTest.Loading: " << filename;
304 310
305 GURL url = test_server()->GetURL(base_url + filename); 311 GURL url = test_server()->GetURL(base_url + filename);
306 ui_test_utils::NavigateToURL(browser(), url); 312 ui_test_utils::NavigateToURL(browser(), url);
307 313
308 while (true) { 314 while (true) {
309 int last_count = load_stop_notification_count(); 315 int last_count = load_stop_notification_count();
310 // We might get extraneous NotificationType::LOAD_STOP notifications when 316 // We might get extraneous NotificationType::LOAD_STOP notifications when
311 // doing async loading. This happens when the first loader is cancelled 317 // doing async loading. This happens when the first loader is cancelled
312 // and before creating a byte-range request loader. 318 // and before creating a byte-range request loader.
313 bool complete = false; 319 bool complete = false;
314 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( 320 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
315 browser()->GetSelectedTabContents()->render_view_host(), 321 browser()->GetSelectedTabContents()->render_view_host(),
316 std::wstring(), 322 std::wstring(),
317 L"window.domAutomationController.send(plugin.documentLoadComplete())", 323 L"window.domAutomationController.send(plugin.documentLoadComplete())",
318 &complete)); 324 &complete));
319 if (complete) 325 if (complete)
320 break; 326 break;
321 327
322 // Check if the LOAD_STOP notification could have come while we run a 328 // Check if the LOAD_STOP notification could have come while we run a
323 // nested message loop for the JS call. 329 // nested message loop for the JS call.
324 if (last_count != load_stop_notification_count()) 330 if (last_count != load_stop_notification_count())
325 continue; 331 continue;
326 ui_test_utils::WaitForLoadStop(controller); 332 ui_test_utils::WaitForLoadStop(controller);
327 } 333 }
328 } 334 }
329 } 335 }
330 336
331 } // namespace 337 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698