| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/translate/core/browser/translate_script.h" | 5 #include "components/translate/core/browser/translate_script.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/macros.h" |
| 9 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "build/build_config.h" |
| 10 #include "components/translate/core/browser/translate_download_manager.h" | 12 #include "components/translate/core/browser/translate_download_manager.h" |
| 11 #include "components/translate/core/common/translate_switches.h" | 13 #include "components/translate/core/common/translate_switches.h" |
| 12 #include "net/base/load_flags.h" | 14 #include "net/base/load_flags.h" |
| 13 #include "net/base/url_util.h" | 15 #include "net/base/url_util.h" |
| 14 #include "net/http/http_request_headers.h" | 16 #include "net/http/http_request_headers.h" |
| 15 #include "net/url_request/test_url_fetcher_factory.h" | 17 #include "net/url_request/test_url_fetcher_factory.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 18 | 20 |
| 19 namespace translate { | 21 namespace translate { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 ASSERT_TRUE(fetcher); | 115 ASSERT_TRUE(fetcher); |
| 114 | 116 |
| 115 GURL expected_url(script_url); | 117 GURL expected_url(script_url); |
| 116 GURL url = fetcher->GetOriginalURL(); | 118 GURL url = fetcher->GetOriginalURL(); |
| 117 EXPECT_TRUE(url.is_valid()); | 119 EXPECT_TRUE(url.is_valid()); |
| 118 EXPECT_EQ(expected_url.GetOrigin().spec(), url.GetOrigin().spec()); | 120 EXPECT_EQ(expected_url.GetOrigin().spec(), url.GetOrigin().spec()); |
| 119 EXPECT_EQ(expected_url.path(), url.path()); | 121 EXPECT_EQ(expected_url.path(), url.path()); |
| 120 } | 122 } |
| 121 | 123 |
| 122 } // namespace translate | 124 } // namespace translate |
| OLD | NEW |