| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/files/file_enumerator.h" | 6 #include "base/files/file_enumerator.h" |
| 7 #include "base/hash.h" | 7 #include "base/hash.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 content::WaitForLoadStop( | 361 content::WaitForLoadStop( |
| 362 browser()->tab_strip_model()->GetActiveWebContents()); | 362 browser()->tab_strip_model()->GetActiveWebContents()); |
| 363 } | 363 } |
| 364 } | 364 } |
| 365 } | 365 } |
| 366 | 366 |
| 367 INSTANTIATE_TEST_CASE_P(PDFTestFiles, | 367 INSTANTIATE_TEST_CASE_P(PDFTestFiles, |
| 368 PDFBrowserTest, | 368 PDFBrowserTest, |
| 369 testing::Range(0, kLoadingNumberOfParts)); | 369 testing::Range(0, kLoadingNumberOfParts)); |
| 370 | 370 |
| 371 IN_PROC_BROWSER_TEST_F(PDFBrowserTest, Action) { | 371 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_MACOSX) |
| 372 // http://crbug.com/315160 |
| 373 #define MAYBE_Action DISABLED_Action |
| 374 #else |
| 375 #define MAYBE_Action Action |
| 376 #endif |
| 377 IN_PROC_BROWSER_TEST_F(PDFBrowserTest, MAYBE_Action) { |
| 372 ASSERT_NO_FATAL_FAILURE(Load()); | 378 ASSERT_NO_FATAL_FAILURE(Load()); |
| 373 | 379 |
| 374 ASSERT_TRUE(content::ExecuteScript( | 380 ASSERT_TRUE(content::ExecuteScript( |
| 375 browser()->tab_strip_model()->GetActiveWebContents(), | 381 browser()->tab_strip_model()->GetActiveWebContents(), |
| 376 "document.getElementsByName('plugin')[0].fitToHeight();")); | 382 "document.getElementsByName('plugin')[0].fitToHeight();")); |
| 377 | 383 |
| 378 std::string zoom1, zoom2; | 384 std::string zoom1, zoom2; |
| 379 ASSERT_TRUE(content::ExecuteScriptAndExtractString( | 385 ASSERT_TRUE(content::ExecuteScriptAndExtractString( |
| 380 browser()->tab_strip_model()->GetActiveWebContents(), | 386 browser()->tab_strip_model()->GetActiveWebContents(), |
| 381 "window.domAutomationController.send(" | 387 "window.domAutomationController.send(" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 410 browser()->tab_strip_model()->GetActiveWebContents(), | 416 browser()->tab_strip_model()->GetActiveWebContents(), |
| 411 "reloadPDF();")); | 417 "reloadPDF();")); |
| 412 observer.Wait(); | 418 observer.Wait(); |
| 413 | 419 |
| 414 ASSERT_EQ("success", | 420 ASSERT_EQ("success", |
| 415 browser()->tab_strip_model()->GetActiveWebContents()-> | 421 browser()->tab_strip_model()->GetActiveWebContents()-> |
| 416 GetURL().query()); | 422 GetURL().query()); |
| 417 } | 423 } |
| 418 | 424 |
| 419 } // namespace | 425 } // namespace |
| OLD | NEW |