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