| 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 #if defined(OS_LINUX) | 5 #if defined(OS_LINUX) |
| 6 #include <gtk/gtk.h> | 6 #include <gtk/gtk.h> |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #include "webkit/api/public/WebFrame.h" |
| 9 #include "webkit/api/public/WebURLResponse.h" | 10 #include "webkit/api/public/WebURLResponse.h" |
| 10 #include "webkit/glue/unittest_test_server.h" | 11 #include "webkit/glue/unittest_test_server.h" |
| 11 #include "webkit/glue/webview.h" | 12 #include "webkit/glue/webview.h" |
| 12 #include "webkit/glue/webframe.h" | |
| 13 #include "webkit/glue/resource_fetcher.h" | 13 #include "webkit/glue/resource_fetcher.h" |
| 14 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" | 14 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" |
| 15 #include "webkit/tools/test_shell/test_shell_test.h" | 15 #include "webkit/tools/test_shell/test_shell_test.h" |
| 16 | 16 |
| 17 using WebKit::WebFrame; |
| 17 using WebKit::WebURLResponse; | 18 using WebKit::WebURLResponse; |
| 18 using webkit_glue::ResourceFetcher; | 19 using webkit_glue::ResourceFetcher; |
| 19 using webkit_glue::ResourceFetcherWithTimeout; | 20 using webkit_glue::ResourceFetcherWithTimeout; |
| 20 | 21 |
| 21 namespace { | 22 namespace { |
| 22 | 23 |
| 23 class ResourceFetcherTests : public TestShellTest { | 24 class ResourceFetcherTests : public TestShellTest { |
| 24 public: | 25 public: |
| 25 void SetUp() { | 26 void SetUp() { |
| 26 TestShellTest::SetUp(); | 27 TestShellTest::SetUp(); |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 223 |
| 223 // When we timeout, we still call the Delegate callback but we pass in empty | 224 // When we timeout, we still call the Delegate callback but we pass in empty |
| 224 // values. | 225 // values. |
| 225 EXPECT_TRUE(delegate->completed()); | 226 EXPECT_TRUE(delegate->completed()); |
| 226 EXPECT_TRUE(delegate->response().isNull()); | 227 EXPECT_TRUE(delegate->response().isNull()); |
| 227 EXPECT_EQ(delegate->data(), std::string()); | 228 EXPECT_EQ(delegate->data(), std::string()); |
| 228 EXPECT_TRUE(delegate->time_elapsed_ms() < kMaxWaitTimeMs); | 229 EXPECT_TRUE(delegate->time_elapsed_ms() < kMaxWaitTimeMs); |
| 229 } | 230 } |
| 230 | 231 |
| 231 } // namespace | 232 } // namespace |
| OLD | NEW |