OLD | NEW |
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 "content/browser/loader/async_resource_handler.h" | 5 #include "content/browser/loader/async_resource_handler.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <string> | 9 #include <string> |
8 | 10 |
9 #include "base/format_macros.h" | 11 #include "base/format_macros.h" |
10 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
11 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 14 #include "build/build_config.h" |
12 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
13 #include "content/public/test/browser_test_utils.h" | 16 #include "content/public/test/browser_test_utils.h" |
14 #include "content/public/test/content_browser_test.h" | 17 #include "content/public/test/content_browser_test.h" |
15 #include "content/public/test/content_browser_test_utils.h" | 18 #include "content/public/test/content_browser_test_utils.h" |
16 #include "content/shell/browser/shell.h" | 19 #include "content/shell/browser/shell.h" |
17 #include "net/test/embedded_test_server/embedded_test_server.h" | 20 #include "net/test/embedded_test_server/embedded_test_server.h" |
18 #include "net/test/embedded_test_server/http_request.h" | 21 #include "net/test/embedded_test_server/http_request.h" |
19 #include "net/test/embedded_test_server/http_response.h" | 22 #include "net/test/embedded_test_server/http_response.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
21 | 24 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 EXPECT_TRUE(ExecuteScriptAndExtractString( | 100 EXPECT_TRUE(ExecuteScriptAndExtractString( |
98 shell()->web_contents(), | 101 shell()->web_contents(), |
99 base::StringPrintf("WaitForAsyncXHR('%s', %" PRIuS ")", | 102 base::StringPrintf("WaitForAsyncXHR('%s', %" PRIuS ")", |
100 kRedirectPostPath, | 103 kRedirectPostPath, |
101 kPayloadSize), | 104 kPayloadSize), |
102 &js_result)); | 105 &js_result)); |
103 EXPECT_EQ(js_result, "success"); | 106 EXPECT_EQ(js_result, "success"); |
104 } | 107 } |
105 | 108 |
106 } // namespace content | 109 } // namespace content |
OLD | NEW |