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 "base/base_switches.h" | 5 #include "base/base_switches.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 message_loop_runner_->Quit(); | 74 message_loop_runner_->Quit(); |
75 | 75 |
76 // Not interested in any further status updates from this fetcher. | 76 // Not interested in any further status updates from this fetcher. |
77 fetcher->SetDelegateForTests(nullptr); | 77 fetcher->SetDelegateForTests(nullptr); |
78 } | 78 } |
79 void OnChunkUpload(int fetcher_id) override {} | 79 void OnChunkUpload(int fetcher_id) override {} |
80 void OnRequestEnd(int fetcher_id) override {} | 80 void OnRequestEnd(int fetcher_id) override {} |
81 | 81 |
82 private: | 82 private: |
83 // Mocks out network requests. | 83 // Mocks out network requests. |
84 scoped_ptr<net::TestURLFetcherFactory> factory_; | 84 std::unique_ptr<net::TestURLFetcherFactory> factory_; |
85 | 85 |
86 const std::string expected_upload_data_; | 86 const std::string expected_upload_data_; |
87 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; | 87 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(WindowedNetworkObserver); | 89 DISALLOW_COPY_AND_ASSIGN(WindowedNetworkObserver); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace | 92 } // namespace |
93 | 93 |
94 class AutofillServerTest : public InProcessBrowserTest { | 94 class AutofillServerTest : public InProcessBrowserTest { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 std::string expected_query_string; | 211 std::string expected_query_string; |
212 ASSERT_TRUE(query.SerializeToString(&expected_query_string)); | 212 ASSERT_TRUE(query.SerializeToString(&expected_query_string)); |
213 | 213 |
214 WindowedNetworkObserver query_network_observer(expected_query_string); | 214 WindowedNetworkObserver query_network_observer(expected_query_string); |
215 ui_test_utils::NavigateToURL( | 215 ui_test_utils::NavigateToURL( |
216 browser(), GURL(std::string(kDataURIPrefix) + kFormHtml)); | 216 browser(), GURL(std::string(kDataURIPrefix) + kFormHtml)); |
217 query_network_observer.Wait(); | 217 query_network_observer.Wait(); |
218 } | 218 } |
219 | 219 |
220 } // namespace autofill | 220 } // namespace autofill |
OLD | NEW |