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 "ios/chrome/browser/web_resource/web_resource_util.h" | 5 #include "ios/chrome/browser/web_resource/web_resource_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "base/threading/sequenced_worker_pool.h" | |
16 #include "base/values.h" | 15 #include "base/values.h" |
17 #include "ios/web/public/web_thread.h" | 16 #include "ios/web/public/web_thread.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
19 | 18 |
20 namespace web_resource { | 19 namespace web_resource { |
21 | 20 |
22 class WebResourceUtilTest : public testing::Test { | 21 class WebResourceUtilTest : public testing::Test { |
23 protected: | 22 protected: |
24 WebResourceUtilTest() : error_called_(false), success_called_(false) {} | 23 WebResourceUtilTest() : error_called_(false), success_called_(false) {} |
25 ~WebResourceUtilTest() override {} | 24 ~WebResourceUtilTest() override {} |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 119 |
121 FlushBackgroundTasks(); | 120 FlushBackgroundTasks(); |
122 | 121 |
123 // The error callback is called. | 122 // The error callback is called. |
124 EXPECT_TRUE(error_called_); | 123 EXPECT_TRUE(error_called_); |
125 EXPECT_FALSE(success_called_); | 124 EXPECT_FALSE(success_called_); |
126 EXPECT_FALSE(error_.empty()); | 125 EXPECT_FALSE(error_.empty()); |
127 } | 126 } |
128 | 127 |
129 } // namespace web_resource | 128 } // namespace web_resource |
OLD | NEW |