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. | |
47 have_plugin_ = file_util::PathExists(pdf_path); | 45 have_plugin_ = file_util::PathExists(pdf_path); |
48 #endif | |
49 InProcessBrowserTest::SetUp(); | 46 InProcessBrowserTest::SetUp(); |
50 } | 47 } |
51 | 48 |
52 void Load() { | 49 void Load() { |
53 GURL url(ui_test_utils::GetTestUrl( | 50 GURL url(ui_test_utils::GetTestUrl( |
54 FilePath(FilePath::kCurrentDirectory), | 51 FilePath(FilePath::kCurrentDirectory), |
55 FilePath(FILE_PATH_LITERAL("pdf_browsertest.pdf")))); | 52 FilePath(FILE_PATH_LITERAL("pdf_browsertest.pdf")))); |
56 ui_test_utils::NavigateToURL(browser(), url); | 53 ui_test_utils::NavigateToURL(browser(), url); |
57 gfx::Rect bounds(gfx::Rect(0, 0, kBrowserWidth, kBrowserHeight)); | 54 gfx::Rect bounds(gfx::Rect(0, 0, kBrowserWidth, kBrowserHeight)); |
58 | 55 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 234 |
238 browser()->GetSelectedTabContents()->render_view_host()->Copy(); | 235 browser()->GetSelectedTabContents()->render_view_host()->Copy(); |
239 ASSERT_NO_FATAL_FAILURE(WaitForResponse()); | 236 ASSERT_NO_FATAL_FAILURE(WaitForResponse()); |
240 | 237 |
241 std::string text; | 238 std::string text; |
242 clipboard.ReadAsciiText(Clipboard::BUFFER_STANDARD, &text); | 239 clipboard.ReadAsciiText(Clipboard::BUFFER_STANDARD, &text); |
243 ASSERT_EQ("adipiscing", text); | 240 ASSERT_EQ("adipiscing", text); |
244 } | 241 } |
245 | 242 |
246 } // namespace | 243 } // namespace |
OLD | NEW |