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

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

Issue 7633032: Revert 96593 - Fix up various browser tests not to use WaitForNavigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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) 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 #define MAYBE_OnLoadAndReload DISABLED_OnLoadAndReload 329 #define MAYBE_OnLoadAndReload DISABLED_OnLoadAndReload
330 #else 330 #else
331 #define MAYBE_OnLoadAndReload FLAKY_OnLoadAndReload 331 #define MAYBE_OnLoadAndReload FLAKY_OnLoadAndReload
332 #endif 332 #endif
333 IN_PROC_BROWSER_TEST_F(PDFBrowserTest, MAYBE_OnLoadAndReload) { 333 IN_PROC_BROWSER_TEST_F(PDFBrowserTest, MAYBE_OnLoadAndReload) {
334 ASSERT_TRUE(pdf_test_server()->Start()); 334 ASSERT_TRUE(pdf_test_server()->Start());
335 335
336 GURL url = pdf_test_server()->GetURL("files/onload_reload.html"); 336 GURL url = pdf_test_server()->GetURL("files/onload_reload.html");
337 ui_test_utils::NavigateToURL(browser(), url); 337 ui_test_utils::NavigateToURL(browser(), url);
338 338
339 ui_test_utils::WindowedNavigationObserver observer(
340 content::NOTIFICATION_LOAD_STOP,
341 Source<NavigationController>(
342 &browser()->GetSelectedTabContents()->controller()));
343 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( 339 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
344 browser()->GetSelectedTabContents()->render_view_host(), 340 browser()->GetSelectedTabContents()->render_view_host(),
345 std::wstring(), 341 std::wstring(),
346 L"reloadPDF();")); 342 L"reloadPDF();"));
347 observer.Wait();
348 343
344 ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser()));
349 ASSERT_EQ("success", browser()->GetSelectedTabContents()->GetURL().query()); 345 ASSERT_EQ("success", browser()->GetSelectedTabContents()->GetURL().query());
350 } 346 }
351 347
352 } // namespace 348 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/geolocation_browsertest.cc ('k') | chrome/browser/sidebar/sidebar_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698