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

Side by Side Diff: trunk/Source/web/tests/WebFrameTest.cpp

Issue 418783002: Revert 178571 "Teach ContentSecurityPolicy about WebURLRequest::..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 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
« no previous file with comments | « trunk/Source/core/xml/parser/XMLDocumentParser.cpp ('k') | 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 5898 matching lines...) Expand 10 before | Expand all | Expand 10 after
5909 registerMockedChromeURLLoad("test.pdf"); 5909 registerMockedChromeURLLoad("test.pdf");
5910 5910
5911 RefPtr<blink::LocalFrame> frame = toLocalFrame(webViewHelper.webViewImpl()-> page()->mainFrame()); 5911 RefPtr<blink::LocalFrame> frame = toLocalFrame(webViewHelper.webViewImpl()-> page()->mainFrame());
5912 5912
5913 MockDocumentThreadableLoaderClient client; 5913 MockDocumentThreadableLoaderClient client;
5914 blink::ThreadableLoaderOptions options; 5914 blink::ThreadableLoaderOptions options;
5915 5915
5916 // First try to load the request with regular access. Should fail. 5916 // First try to load the request with regular access. Should fail.
5917 options.crossOriginRequestPolicy = blink::UseAccessControl; 5917 options.crossOriginRequestPolicy = blink::UseAccessControl;
5918 blink::ResourceLoaderOptions resourceLoaderOptions; 5918 blink::ResourceLoaderOptions resourceLoaderOptions;
5919 blink::ResourceRequest request(resourceUrl);
5920 request.setRequestContext(WebURLRequest::RequestContextInternal);
5921 blink::DocumentThreadableLoader::loadResourceSynchronously( 5919 blink::DocumentThreadableLoader::loadResourceSynchronously(
5922 *frame->document(), request, client, options, resourceLoaderOptions); 5920 *frame->document(), blink::ResourceRequest(resourceUrl), client, options , resourceLoaderOptions);
5923 EXPECT_TRUE(client.failed()); 5921 EXPECT_TRUE(client.failed());
5924 5922
5925 client.reset(); 5923 client.reset();
5926 // Try to load the request with cross origin access. Should succeed. 5924 // Try to load the request with cross origin access. Should succeed.
5927 options.crossOriginRequestPolicy = blink::AllowCrossOriginRequests; 5925 options.crossOriginRequestPolicy = blink::AllowCrossOriginRequests;
5928 blink::DocumentThreadableLoader::loadResourceSynchronously( 5926 blink::DocumentThreadableLoader::loadResourceSynchronously(
5929 *frame->document(), request, client, options, resourceLoaderOptions); 5927 *frame->document(), blink::ResourceRequest(resourceUrl), client, options , resourceLoaderOptions);
5930 EXPECT_FALSE(client.failed()); 5928 EXPECT_FALSE(client.failed());
5931 } 5929 }
5932 5930
5933 } // namespace 5931 } // namespace
OLDNEW
« no previous file with comments | « trunk/Source/core/xml/parser/XMLDocumentParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698