OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 262 |
263 std::string text; | 263 std::string text; |
264 clipboard.ReadAsciiText(ui::Clipboard::BUFFER_STANDARD, &text); | 264 clipboard.ReadAsciiText(ui::Clipboard::BUFFER_STANDARD, &text); |
265 ASSERT_EQ("adipiscing", text); | 265 ASSERT_EQ("adipiscing", text); |
266 } | 266 } |
267 | 267 |
268 // Tests that loading async pdfs works correctly (i.e. document fully loads). | 268 // Tests that loading async pdfs works correctly (i.e. document fully loads). |
269 // This also loads all documents that used to crash, to ensure we don't have | 269 // This also loads all documents that used to crash, to ensure we don't have |
270 // regressions. | 270 // regressions. |
271 // Flaky as per http://crbug.com/74548. | 271 // Flaky as per http://crbug.com/74548. |
272 IN_PROC_BROWSER_TEST_F(PDFBrowserTest, FLAKY_SLOW_Loading) { | 272 IN_PROC_BROWSER_TEST_F(PDFBrowserTest, DISABLED_SLOW_Loading) { |
273 ASSERT_TRUE(pdf_test_server()->Start()); | 273 ASSERT_TRUE(pdf_test_server()->Start()); |
274 | 274 |
275 NavigationController* controller = | 275 NavigationController* controller = |
276 &(browser()->GetSelectedTabContents()->controller()); | 276 &(browser()->GetSelectedTabContents()->controller()); |
277 NotificationRegistrar registrar; | 277 NotificationRegistrar registrar; |
278 registrar.Add(this, | 278 registrar.Add(this, |
279 NotificationType::LOAD_STOP, | 279 NotificationType::LOAD_STOP, |
280 Source<NavigationController>(controller)); | 280 Source<NavigationController>(controller)); |
281 std::string base_url = std::string("files/"); | 281 std::string base_url = std::string("files/"); |
282 | 282 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( | 339 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( |
340 browser()->GetSelectedTabContents()->render_view_host(), | 340 browser()->GetSelectedTabContents()->render_view_host(), |
341 std::wstring(), | 341 std::wstring(), |
342 L"reloadPDF();")); | 342 L"reloadPDF();")); |
343 | 343 |
344 ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); | 344 ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); |
345 ASSERT_EQ("success", browser()->GetSelectedTabContents()->GetURL().query()); | 345 ASSERT_EQ("success", browser()->GetSelectedTabContents()->GetURL().query()); |
346 } | 346 } |
347 | 347 |
348 } // namespace | 348 } // namespace |
OLD | NEW |