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

Unified Diff: Source/WebKit/chromium/tests/AssociatedURLLoaderTest.cpp

Issue 14495011: Revert "Create errors (especially cancellation errors) internally to WebCore, rather" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp ('k') | Source/WebKit/chromium/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/tests/AssociatedURLLoaderTest.cpp
diff --git a/Source/WebKit/chromium/tests/AssociatedURLLoaderTest.cpp b/Source/WebKit/chromium/tests/AssociatedURLLoaderTest.cpp
index 5609bbd08e3f6edbdf41f73f7c44118f1c37cd77..67658d49cc9bb725bcc1a80a88c6a548b516387d 100644
--- a/Source/WebKit/chromium/tests/AssociatedURLLoaderTest.cpp
+++ b/Source/WebKit/chromium/tests/AssociatedURLLoaderTest.cpp
@@ -54,6 +54,15 @@ using WebKit::URLTestHelpers::toKURL;
namespace {
class TestWebFrameClient : public WebFrameClient {
+ // Return a non-null cancellation error so the WebFrame loaders can shut down without asserting.
+ // Make 'reason' non-zero so WebURLError isn't considered null.
+ WebURLError cancelledError(WebFrame*, const WebURLRequest& request)
+ {
+ WebURLError error;
+ error.reason = 1;
+ error.unreachableURL = request.url();
+ return error;
+ }
};
class AssociatedURLLoaderTest : public testing::Test,
« no previous file with comments | « Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp ('k') | Source/WebKit/chromium/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698