| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
| 6 #include "base/string_number_conversions.h" | 6 #include "base/string_number_conversions.h" |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser_list.h" | 9 #include "chrome/browser/browser_list.h" |
| 10 #include "chrome/browser/dom_operation_notification_details.h" | 10 #include "chrome/browser/dom_operation_notification_details.h" |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 | 534 |
| 535 int num_infobars_before_cancel = | 535 int num_infobars_before_cancel = |
| 536 current_browser_->GetSelectedTabContents()->infobar_delegate_count(); | 536 current_browser_->GetSelectedTabContents()->infobar_delegate_count(); |
| 537 // Change the iframe, and ensure the infobar is gone. | 537 // Change the iframe, and ensure the infobar is gone. |
| 538 IFrameLoader change_iframe_1(current_browser_, 1, current_url_); | 538 IFrameLoader change_iframe_1(current_browser_, 1, current_url_); |
| 539 int num_infobars_after_cancel = | 539 int num_infobars_after_cancel = |
| 540 current_browser_->GetSelectedTabContents()->infobar_delegate_count(); | 540 current_browser_->GetSelectedTabContents()->infobar_delegate_count(); |
| 541 EXPECT_EQ(num_infobars_before_cancel, num_infobars_after_cancel + 1); | 541 EXPECT_EQ(num_infobars_before_cancel, num_infobars_after_cancel + 1); |
| 542 } | 542 } |
| 543 | 543 |
| 544 IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, InvalidUrlRequest) { | 544 // Disabled, http://crbug.com/66959. |
| 545 IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, DISABLED_InvalidUrlRequest) { |
| 545 // Tests that an invalid URL (e.g. from a popup window) is rejected | 546 // Tests that an invalid URL (e.g. from a popup window) is rejected |
| 546 // correctly. Also acts as a regression test for http://crbug.com/40478 | 547 // correctly. Also acts as a regression test for http://crbug.com/40478 |
| 547 html_for_tests_ = "files/geolocation/invalid_request_url.html"; | 548 html_for_tests_ = "files/geolocation/invalid_request_url.html"; |
| 548 ASSERT_TRUE(Initialize(INITIALIZATION_NONE)); | 549 ASSERT_TRUE(Initialize(INITIALIZATION_NONE)); |
| 549 TabContents* original_tab = current_browser_->GetSelectedTabContents(); | 550 TabContents* original_tab = current_browser_->GetSelectedTabContents(); |
| 550 CheckStringValueFromJavascript("1", "requestGeolocationFromInvalidUrl()"); | 551 CheckStringValueFromJavascript("1", "requestGeolocationFromInvalidUrl()"); |
| 551 CheckStringValueFromJavascriptForTab("1", "isAlive()", original_tab); | 552 CheckStringValueFromJavascriptForTab("1", "isAlive()", original_tab); |
| 552 } | 553 } |
| 553 | 554 |
| 554 // Crashy, http://crbug.com/66400. | 555 // Crashy, http://crbug.com/66400. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 AddGeolocationWatch(true); | 594 AddGeolocationWatch(true); |
| 594 SetInfobarResponse(current_url_, true); | 595 SetInfobarResponse(current_url_, true); |
| 595 CheckGeoposition(MockLocationProvider::instance_->position_); | 596 CheckGeoposition(MockLocationProvider::instance_->position_); |
| 596 | 597 |
| 597 // The second watch will now have cancelled. Ensure an update still makes | 598 // The second watch will now have cancelled. Ensure an update still makes |
| 598 // its way through to the first watcher. | 599 // its way through to the first watcher. |
| 599 NotifyGeoposition(final_position); | 600 NotifyGeoposition(final_position); |
| 600 WaitForNavigation(); | 601 WaitForNavigation(); |
| 601 CheckGeoposition(final_position); | 602 CheckGeoposition(final_position); |
| 602 } | 603 } |
| OLD | NEW |