| OLD | NEW |
| 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 iframe_xpath_ = L"//iframe[@id='iframe_1']"; | 536 iframe_xpath_ = L"//iframe[@id='iframe_1']"; |
| 537 AddGeolocationWatch(true); | 537 AddGeolocationWatch(true); |
| 538 // WebKit will use its cache, but we also broadcast a position shortly | 538 // WebKit will use its cache, but we also broadcast a position shortly |
| 539 // afterwards. We're only interested in the first navigation for the success | 539 // afterwards. We're only interested in the first navigation for the success |
| 540 // callback from the cached position. | 540 // callback from the cached position. |
| 541 CheckStringValueFromJavascript("1", "geoSetMaxNavigateCount(1)"); | 541 CheckStringValueFromJavascript("1", "geoSetMaxNavigateCount(1)"); |
| 542 SetInfobarResponse(iframe_urls_[1], true); | 542 SetInfobarResponse(iframe_urls_[1], true); |
| 543 CheckGeoposition(cached_position_latitude, cached_position_lognitude); | 543 CheckGeoposition(cached_position_latitude, cached_position_lognitude); |
| 544 } | 544 } |
| 545 | 545 |
| 546 // See http://crbug.com/56033 | 546 IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, CancelPermissionForFrame) { |
| 547 IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, | |
| 548 DISABLED_CancelPermissionForFrame) { | |
| 549 html_for_tests_ = "files/geolocation/iframes_different_origin.html"; | 547 html_for_tests_ = "files/geolocation/iframes_different_origin.html"; |
| 550 ASSERT_TRUE(Initialize(INITIALIZATION_IFRAMES)); | 548 ASSERT_TRUE(Initialize(INITIALIZATION_IFRAMES)); |
| 551 LoadIFrames(2); | 549 LoadIFrames(2); |
| 552 LOG(WARNING) << "frames loaded"; | 550 LOG(WARNING) << "frames loaded"; |
| 553 | 551 |
| 554 iframe_xpath_ = L"//iframe[@id='iframe_0']"; | 552 iframe_xpath_ = L"//iframe[@id='iframe_0']"; |
| 555 AddGeolocationWatch(true); | 553 AddGeolocationWatch(true); |
| 556 SetInfobarResponse(iframe_urls_[0], true); | 554 SetInfobarResponse(iframe_urls_[0], true); |
| 557 CheckGeoposition(fake_latitude_, fake_longitude_); | 555 CheckGeoposition(fake_latitude_, fake_longitude_); |
| 558 // Disables further prompts from this iframe. | 556 // Disables further prompts from this iframe. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 "window.domAutomationController.setAutomationId(0);" | 655 "window.domAutomationController.setAutomationId(0);" |
| 658 "window.domAutomationController.send(window.close());"; | 656 "window.domAutomationController.send(window.close());"; |
| 659 bool result = | 657 bool result = |
| 660 content::ExecuteJavaScript( | 658 content::ExecuteJavaScript( |
| 661 chrome::GetActiveWebContents(current_browser_)->GetRenderViewHost(), | 659 chrome::GetActiveWebContents(current_browser_)->GetRenderViewHost(), |
| 662 L"", UTF8ToWide(script)); | 660 L"", UTF8ToWide(script)); |
| 663 EXPECT_EQ(result, true); | 661 EXPECT_EQ(result, true); |
| 664 } | 662 } |
| 665 | 663 |
| 666 } // namespace | 664 } // namespace |
| OLD | NEW |