| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef WEBKIT_GLUE_UNITTEST_TEST_SERVER_H__ | 5 #ifndef WEBKIT_GLUE_UNITTEST_TEST_SERVER_H__ |
| 6 #define WEBKIT_GLUE_UNITTEST_TEST_SERVER_H__ | 6 #define WEBKIT_GLUE_UNITTEST_TEST_SERVER_H__ |
| 7 | 7 |
| 8 #include "webkit/glue/resource_loader_bridge.h" | 8 #include "webkit/glue/resource_loader_bridge.h" |
| 9 #include "net/base/load_flags.h" | 9 #include "net/base/load_flags.h" |
| 10 #include "net/url_request/url_request_unittest.h" | 10 #include "net/url_request/url_request_unittest.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 virtual bool MakeGETRequest(const std::string& page_name) { | 38 virtual bool MakeGETRequest(const std::string& page_name) { |
| 39 GURL url(TestServerPage(page_name)); | 39 GURL url(TestServerPage(page_name)); |
| 40 scoped_ptr<ResourceLoaderBridge> loader( | 40 scoped_ptr<ResourceLoaderBridge> loader( |
| 41 ResourceLoaderBridge::Create(NULL, "GET", | 41 ResourceLoaderBridge::Create(NULL, "GET", |
| 42 url, | 42 url, |
| 43 url, // policy_url | 43 url, // policy_url |
| 44 GURL(), // no referrer | 44 GURL(), // no referrer |
| 45 std::string(), // no extra headers | 45 std::string(), // no extra headers |
| 46 net::LOAD_NORMAL, | 46 net::LOAD_NORMAL, |
| 47 0, | 47 0, |
| 48 ResourceType::SUB_RESOURCE, | 48 ResourceType::SUB_RESOURCE)); |
| 49 false)); | |
| 50 EXPECT_TRUE(loader.get()); | 49 EXPECT_TRUE(loader.get()); |
| 51 | 50 |
| 52 ResourceLoaderBridge::SyncLoadResponse resp; | 51 ResourceLoaderBridge::SyncLoadResponse resp; |
| 53 loader->SyncLoad(&resp); | 52 loader->SyncLoad(&resp); |
| 54 return resp.status.is_success(); | 53 return resp.status.is_success(); |
| 55 } | 54 } |
| 56 }; | 55 }; |
| 57 | 56 |
| 58 #endif // WEBKIT_GLUE_UNITTEST_TEST_SERVER_H__ | 57 #endif // WEBKIT_GLUE_UNITTEST_TEST_SERVER_H__ |
| OLD | NEW |