| 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 "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/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 snapshot_different_(true), | 35 snapshot_different_(true), |
| 36 next_dummy_search_value_(0) { | 36 next_dummy_search_value_(0) { |
| 37 } | 37 } |
| 38 | 38 |
| 39 protected: | 39 protected: |
| 40 bool have_plugin() const { return have_plugin_; } | 40 bool have_plugin() const { return have_plugin_; } |
| 41 | 41 |
| 42 virtual void SetUp() { | 42 virtual void SetUp() { |
| 43 FilePath pdf_path; | 43 FilePath pdf_path; |
| 44 PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path); | 44 PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path); |
| 45 #if !defined(OS_MACOSX) |
| 46 // http://crbug.com/61258: renderer always crashes on Mac. |
| 45 have_plugin_ = file_util::PathExists(pdf_path); | 47 have_plugin_ = file_util::PathExists(pdf_path); |
| 48 #endif |
| 46 InProcessBrowserTest::SetUp(); | 49 InProcessBrowserTest::SetUp(); |
| 47 } | 50 } |
| 48 | 51 |
| 49 void Load() { | 52 void Load() { |
| 50 GURL url(ui_test_utils::GetTestUrl( | 53 GURL url(ui_test_utils::GetTestUrl( |
| 51 FilePath(FilePath::kCurrentDirectory), | 54 FilePath(FilePath::kCurrentDirectory), |
| 52 FilePath(FILE_PATH_LITERAL("pdf_browsertest.pdf")))); | 55 FilePath(FILE_PATH_LITERAL("pdf_browsertest.pdf")))); |
| 53 ui_test_utils::NavigateToURL(browser(), url); | 56 ui_test_utils::NavigateToURL(browser(), url); |
| 54 gfx::Rect bounds(gfx::Rect(0, 0, kBrowserWidth, kBrowserHeight)); | 57 gfx::Rect bounds(gfx::Rect(0, 0, kBrowserWidth, kBrowserHeight)); |
| 55 | 58 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 237 |
| 235 browser()->GetSelectedTabContents()->render_view_host()->Copy(); | 238 browser()->GetSelectedTabContents()->render_view_host()->Copy(); |
| 236 ASSERT_NO_FATAL_FAILURE(WaitForResponse()); | 239 ASSERT_NO_FATAL_FAILURE(WaitForResponse()); |
| 237 | 240 |
| 238 std::string text; | 241 std::string text; |
| 239 clipboard.ReadAsciiText(Clipboard::BUFFER_STANDARD, &text); | 242 clipboard.ReadAsciiText(Clipboard::BUFFER_STANDARD, &text); |
| 240 ASSERT_EQ("adipiscing", text); | 243 ASSERT_EQ("adipiscing", text); |
| 241 } | 244 } |
| 242 | 245 |
| 243 } // namespace | 246 } // namespace |
| OLD | NEW |