| 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 #include <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/process.h" | 8 #include "base/process.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "chrome/common/filter_policy.h" | 10 #include "chrome/common/filter_policy.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 /*static*/ | 150 /*static*/ |
| 151 scoped_ptr<ResourceDispatcher> ResourceDispatcherTest::dispatcher_; | 151 scoped_ptr<ResourceDispatcher> ResourceDispatcherTest::dispatcher_; |
| 152 | 152 |
| 153 // Does a simple request and tests that the correct data is received. | 153 // Does a simple request and tests that the correct data is received. |
| 154 TEST_F(ResourceDispatcherTest, RoundTrip) { | 154 TEST_F(ResourceDispatcherTest, RoundTrip) { |
| 155 TestRequestCallback callback; | 155 TestRequestCallback callback; |
| 156 ResourceLoaderBridge* bridge = | 156 ResourceLoaderBridge* bridge = |
| 157 dispatcher_->CreateBridge("GET", GURL(test_page_url), GURL(test_page_url), | 157 dispatcher_->CreateBridge("GET", GURL(test_page_url), GURL(test_page_url), |
| 158 GURL(), std::string(), 0, 0, | 158 GURL(), "null", "null", std::string(), 0, 0, |
| 159 ResourceType::SUB_RESOURCE, false, 0, | 159 ResourceType::SUB_RESOURCE, 0, |
| 160 MSG_ROUTING_CONTROL); | 160 MSG_ROUTING_CONTROL); |
| 161 | 161 |
| 162 bridge->Start(&callback); | 162 bridge->Start(&callback); |
| 163 | 163 |
| 164 ProcessMessages(); | 164 ProcessMessages(); |
| 165 | 165 |
| 166 // FIXME(brettw) when the request complete messages are actually handledo | 166 // FIXME(brettw) when the request complete messages are actually handledo |
| 167 // and dispatched, uncomment this. | 167 // and dispatched, uncomment this. |
| 168 //EXPECT_TRUE(callback.complete()); | 168 //EXPECT_TRUE(callback.complete()); |
| 169 //EXPECT_STREQ(test_page_contents, callback.data().c_str()); | 169 //EXPECT_STREQ(test_page_contents, callback.data().c_str()); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 181 // FIXME | 181 // FIXME |
| 182 } | 182 } |
| 183 | 183 |
| 184 TEST_F(ResourceDispatcherTest, Cookies) { | 184 TEST_F(ResourceDispatcherTest, Cookies) { |
| 185 // FIXME | 185 // FIXME |
| 186 } | 186 } |
| 187 | 187 |
| 188 TEST_F(ResourceDispatcherTest, SerializedPostData) { | 188 TEST_F(ResourceDispatcherTest, SerializedPostData) { |
| 189 // FIXME | 189 // FIXME |
| 190 } | 190 } |
| OLD | NEW |