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

Side by Side Diff: ios/chrome/browser/web/browsing_egtest.mm

Issue 2669303004: Removed externalRequest code from CRWWebController. (Closed)
Patch Set: Removed kWindowNameSeparator Created 3 years, 10 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 | ios/chrome/browser/web/window_open_by_dom_egtest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #import <XCTest/XCTest.h> 5 #import <XCTest/XCTest.h>
6 #include <map> 6 #include <map>
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/ios/ios_util.h" 10 #include "base/ios/ios_util.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 chrome_test_util::AssertMainTabCount(2); 272 chrome_test_util::AssertMainTabCount(2);
273 273
274 // Verify the new tab was opened with the expected URL. 274 // Verify the new tab was opened with the expected URL.
275 [[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())] 275 [[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())]
276 assertWithMatcher:grey_notNil()]; 276 assertWithMatcher:grey_notNil()];
277 } 277 }
278 278
279 // Tests that clicking a link with URL changed by onclick uses the href of the 279 // Tests that clicking a link with URL changed by onclick uses the href of the
280 // anchor tag instead of the one specified in JavaScript. Also verifies a new 280 // anchor tag instead of the one specified in JavaScript. Also verifies a new
281 // tab is opened by target '_blank'. 281 // tab is opened by target '_blank'.
282 - (void)testBrowsingPreventDefaultWithLinkOpenedByJavascript { 282 // TODO(crbug.com/688223): WKWebView does not open a new window as expected by
283 // this test.
284 - (void)DISABLED_testBrowsingPreventDefaultWithLinkOpenedByJavascript {
283 // Create map of canned responses and set up the test HTML server. 285 // Create map of canned responses and set up the test HTML server.
284 std::map<GURL, std::string> responses; 286 std::map<GURL, std::string> responses;
285 const GURL URL = web::test::HttpServer::MakeUrl( 287 const GURL URL = web::test::HttpServer::MakeUrl(
286 "http://preventDefaultWithLinkOpenedByJavascript"); 288 "http://preventDefaultWithLinkOpenedByJavascript");
287 const GURL anchorURL = 289 const GURL anchorURL =
288 web::test::HttpServer::MakeUrl("http://anchorDestination"); 290 web::test::HttpServer::MakeUrl("http://anchorDestination");
289 const GURL destinationURL = 291 const GURL destinationURL =
290 web::test::HttpServer::MakeUrl("http://javaScriptDestination"); 292 web::test::HttpServer::MakeUrl("http://javaScriptDestination");
291 // This is a page with a link where the href and JavaScript are setting the 293 // This is a page with a link where the href and JavaScript are setting the
292 // destination to two different URLs so the test can verify which one the 294 // destination to two different URLs so the test can verify which one the
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 [[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())] 662 [[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())]
661 assertWithMatcher:grey_notNil()]; 663 assertWithMatcher:grey_notNil()];
662 664
663 // Go back and verify that the browser navigates to the original URL. 665 // Go back and verify that the browser navigates to the original URL.
664 [self goBack]; 666 [self goBack];
665 [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())] 667 [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())]
666 assertWithMatcher:grey_notNil()]; 668 assertWithMatcher:grey_notNil()];
667 } 669 }
668 670
669 @end 671 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/web/window_open_by_dom_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698