OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 { | 361 { |
362 Platform::current()->getURLLoaderMockFactory()->serveAsynchronousRequest
s(); | 362 Platform::current()->getURLLoaderMockFactory()->serveAsynchronousRequest
s(); |
363 } | 363 } |
364 | 364 |
365 // No callbacks should be received except for the notifyFinished() | 365 // No callbacks should be received except for the notifyFinished() |
366 // triggered by ResourceLoader::cancel(). | 366 // triggered by ResourceLoader::cancel(). |
367 void dataSent(Resource*, unsigned long long, unsigned long long) override {
ASSERT_TRUE(false); } | 367 void dataSent(Resource*, unsigned long long, unsigned long long) override {
ASSERT_TRUE(false); } |
368 void responseReceived(Resource*, const ResourceResponse&, std::unique_ptr<We
bDataConsumerHandle>) override { ASSERT_TRUE(false); } | 368 void responseReceived(Resource*, const ResourceResponse&, std::unique_ptr<We
bDataConsumerHandle>) override { ASSERT_TRUE(false); } |
369 void setSerializedCachedMetadata(Resource*, const char*, size_t) override {
ASSERT_TRUE(false); } | 369 void setSerializedCachedMetadata(Resource*, const char*, size_t) override {
ASSERT_TRUE(false); } |
370 void dataReceived(Resource*, const char*, size_t) override { ASSERT_TRUE(fal
se); } | 370 void dataReceived(Resource*, const char*, size_t) override { ASSERT_TRUE(fal
se); } |
371 void redirectReceived(Resource*, ResourceRequest&, const ResourceResponse&)
override { ASSERT_TRUE(false); } | 371 bool redirectReceived(Resource*, const ResourceRequest&, const ResourceRespo
nse&) override { ADD_FAILURE(); return true; } |
372 void dataDownloaded(Resource*, int) override { ASSERT_TRUE(false); } | 372 void dataDownloaded(Resource*, int) override { ASSERT_TRUE(false); } |
373 void didReceiveResourceTiming(Resource*, const ResourceTimingInfo&) override
{ ASSERT_TRUE(false); } | 373 void didReceiveResourceTiming(Resource*, const ResourceTimingInfo&) override
{ ASSERT_TRUE(false); } |
374 | 374 |
375 DEFINE_INLINE_TRACE() | 375 DEFINE_INLINE_TRACE() |
376 { | 376 { |
377 RawResourceClient::trace(visitor); | 377 RawResourceClient::trace(visitor); |
378 } | 378 } |
379 | 379 |
380 String debugName() const override { return "ServeRequestsOnCompleteClient";
} | 380 String debugName() const override { return "ServeRequestsOnCompleteClient";
} |
381 }; | 381 }; |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 FetchRequest fetchRequest = FetchRequest(url, FetchInitiatorInfo()); | 677 FetchRequest fetchRequest = FetchRequest(url, FetchInitiatorInfo()); |
678 Platform::current()->getURLLoaderMockFactory()->registerURL(url, WebURLRespo
nse(), ""); | 678 Platform::current()->getURLLoaderMockFactory()->registerURL(url, WebURLRespo
nse(), ""); |
679 Resource* newResource = fetcher->requestResource(fetchRequest, TestResourceF
actory(Resource::Raw)); | 679 Resource* newResource = fetcher->requestResource(fetchRequest, TestResourceF
actory(Resource::Raw)); |
680 fetcher->stopFetching(); | 680 fetcher->stopFetching(); |
681 Platform::current()->getURLLoaderMockFactory()->unregisterURL(url); | 681 Platform::current()->getURLLoaderMockFactory()->unregisterURL(url); |
682 | 682 |
683 EXPECT_NE(resource, newResource); | 683 EXPECT_NE(resource, newResource); |
684 } | 684 } |
685 | 685 |
686 } // namespace blink | 686 } // namespace blink |
OLD | NEW |