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

Side by Side Diff: chrome/browser/geolocation/geolocation_browsertest.cc

Issue 9874016: Reenable GeolocationBrowserTest.TabDestroyed browser test. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Try to land again. Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 5 #include <string>
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 // its way through to the first watcher. 641 // its way through to the first watcher.
642 ui_test_utils::WindowedNotificationObserver observer( 642 ui_test_utils::WindowedNotificationObserver observer(
643 content::NOTIFICATION_LOAD_STOP, 643 content::NOTIFICATION_LOAD_STOP,
644 content::Source<NavigationController>( 644 content::Source<NavigationController>(
645 &current_browser_->GetSelectedWebContents()->GetController())); 645 &current_browser_->GetSelectedWebContents()->GetController()));
646 NotifyGeoposition(final_position_latitude, final_position_longitude); 646 NotifyGeoposition(final_position_latitude, final_position_longitude);
647 observer.Wait(); 647 observer.Wait();
648 CheckGeoposition(final_position_latitude, final_position_longitude); 648 CheckGeoposition(final_position_latitude, final_position_longitude);
649 } 649 }
650 650
651 // Hangs flakily, http://crbug.com/70588. 651 IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, TabDestroyed) {
652 IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, DISABLED_TabDestroyed) {
653 html_for_tests_ = "files/geolocation/tab_destroyed.html"; 652 html_for_tests_ = "files/geolocation/tab_destroyed.html";
654 ASSERT_TRUE(Initialize(INITIALIZATION_IFRAMES)); 653 ASSERT_TRUE(Initialize(INITIALIZATION_IFRAMES));
655 LoadIFrames(3); 654 LoadIFrames(3);
656 655
657 iframe_xpath_ = L"//iframe[@id='iframe_0']"; 656 iframe_xpath_ = L"//iframe[@id='iframe_0']";
658 AddGeolocationWatch(true); 657 AddGeolocationWatch(true);
659 658
660 iframe_xpath_ = L"//iframe[@id='iframe_1']"; 659 iframe_xpath_ = L"//iframe[@id='iframe_1']";
661 AddGeolocationWatch(false); 660 AddGeolocationWatch(false);
662 661
663 iframe_xpath_ = L"//iframe[@id='iframe_2']"; 662 iframe_xpath_ = L"//iframe[@id='iframe_2']";
664 AddGeolocationWatch(false); 663 AddGeolocationWatch(false);
665 664
666 std::string script = 665 std::string script =
667 "window.domAutomationController.setAutomationId(0);" 666 "window.domAutomationController.setAutomationId(0);"
668 "window.domAutomationController.send(window.close());"; 667 "window.domAutomationController.send(window.close());";
669 bool result = 668 bool result =
670 ui_test_utils::ExecuteJavaScript( 669 ui_test_utils::ExecuteJavaScript(
671 current_browser_->GetSelectedWebContents()->GetRenderViewHost(), 670 current_browser_->GetSelectedWebContents()->GetRenderViewHost(),
672 L"", UTF8ToWide(script)); 671 L"", UTF8ToWide(script));
673 EXPECT_EQ(result, true); 672 EXPECT_EQ(result, true);
674 } 673 }
675 674
676 } // namespace 675 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698