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

Side by Side Diff: Source/web/tests/sim/SimRequest.cpp

Issue 1316673009: Revert of Add a FOUC painting test. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | « Source/web/tests/sim/SimRequest.h ('k') | Source/web/web.gypi » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "config.h" 5 #include "config.h"
6 #include "web/tests/sim/SimRequest.h" 6 #include "web/tests/sim/SimRequest.h"
7 7
8 #include "platform/weborigin/KURL.h" 8 #include "platform/weborigin/KURL.h"
9 #include "public/platform/Platform.h" 9 #include "public/platform/Platform.h"
10 #include "public/platform/WebURLLoaderClient.h" 10 #include "public/platform/WebURLLoaderClient.h"
(...skipping 10 matching lines...) Expand all
21 , m_isReady(false) 21 , m_isReady(false)
22 { 22 {
23 KURL fullUrl(ParsedURLString, url); 23 KURL fullUrl(ParsedURLString, url);
24 WebURLResponse response(fullUrl); 24 WebURLResponse response(fullUrl);
25 response.setMIMEType(mimeType); 25 response.setMIMEType(mimeType);
26 response.setHTTPStatusCode(200); 26 response.setHTTPStatusCode(200);
27 Platform::current()->unitTestSupport()->registerMockedURL(fullUrl, response, ""); 27 Platform::current()->unitTestSupport()->registerMockedURL(fullUrl, response, "");
28 SimNetwork::current().addRequest(*this); 28 SimNetwork::current().addRequest(*this);
29 } 29 }
30 30
31 SimRequest::~SimRequest()
32 {
33 ASSERT(!m_isReady);
34 }
35
36 void SimRequest::didReceiveResponse(WebURLLoaderClient* client, WebURLLoader* lo ader, const WebURLResponse& response) 31 void SimRequest::didReceiveResponse(WebURLLoaderClient* client, WebURLLoader* lo ader, const WebURLResponse& response)
37 { 32 {
38 m_client = client; 33 m_client = client;
39 m_loader = loader; 34 m_loader = loader;
40 m_response = response; 35 m_response = response;
41 m_isReady = true; 36 m_isReady = true;
42 } 37 }
43 38
44 void SimRequest::didFail(const WebURLError& error) 39 void SimRequest::didFail(const WebURLError& error)
45 { 40 {
(...skipping 28 matching lines...) Expand all
74 69
75 void SimRequest::reset() 70 void SimRequest::reset()
76 { 71 {
77 m_isReady = false; 72 m_isReady = false;
78 m_client = nullptr; 73 m_client = nullptr;
79 m_loader = nullptr; 74 m_loader = nullptr;
80 SimNetwork::current().removeRequest(*this); 75 SimNetwork::current().removeRequest(*this);
81 } 76 }
82 77
83 } // namespace blink 78 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/tests/sim/SimRequest.h ('k') | Source/web/web.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698