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

Side by Side Diff: chrome/browser/ui/pdf/pdf_browsertest.cc

Issue 10807047: Create content\public\test\test_utils.h to hold common test classes that are used by unit and brows… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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
OLDNEW
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/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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 338 }
339 } 339 }
340 340
341 // Flaky as per http://crbug.com/74549. 341 // Flaky as per http://crbug.com/74549.
342 IN_PROC_BROWSER_TEST_F(PDFBrowserTest, DISABLED_OnLoadAndReload) { 342 IN_PROC_BROWSER_TEST_F(PDFBrowserTest, DISABLED_OnLoadAndReload) {
343 ASSERT_TRUE(pdf_test_server()->Start()); 343 ASSERT_TRUE(pdf_test_server()->Start());
344 344
345 GURL url = pdf_test_server()->GetURL("files/onload_reload.html"); 345 GURL url = pdf_test_server()->GetURL("files/onload_reload.html");
346 ui_test_utils::NavigateToURL(browser(), url); 346 ui_test_utils::NavigateToURL(browser(), url);
347 347
348 ui_test_utils::WindowedNotificationObserver observer( 348 content::WindowedNotificationObserver observer(
349 content::NOTIFICATION_LOAD_STOP, 349 content::NOTIFICATION_LOAD_STOP,
350 content::Source<NavigationController>( 350 content::Source<NavigationController>(
351 &chrome::GetActiveWebContents(browser())->GetController())); 351 &chrome::GetActiveWebContents(browser())->GetController()));
352 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( 352 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
353 chrome::GetActiveWebContents(browser())->GetRenderViewHost(), 353 chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
354 std::wstring(), 354 std::wstring(),
355 L"reloadPDF();")); 355 L"reloadPDF();"));
356 observer.Wait(); 356 observer.Wait();
357 357
358 ASSERT_EQ("success", 358 ASSERT_EQ("success",
359 chrome::GetActiveWebContents(browser())->GetURL().query()); 359 chrome::GetActiveWebContents(browser())->GetURL().query());
360 } 360 }
361 361
362 } // namespace 362 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698