OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <map> | 5 #include <map> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "components/dom_distiller/core/distiller.h" | 13 #include "components/dom_distiller/core/distiller.h" |
14 #include "components/dom_distiller/core/distiller_page.h" | 14 #include "components/dom_distiller/core/distiller_page.h" |
15 #include "components/dom_distiller/core/proto/distilled_page.pb.h" | 15 #include "components/dom_distiller/core/proto/distilled_page.pb.h" |
16 #include "net/url_request/url_request_context_getter.h" | 16 #include "net/url_request/url_request_context_getter.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
20 | 20 |
21 #if defined(OS_ANDROID) | 21 #if defined(OS_ANDROID) |
22 #include "base/android/jni_android.h" | 22 #include "base/android/jni_android.h" |
23 #include "ui/base/android/ui_jni_registrar.h" | 23 #include "ui/base/android/ui_base_jni_registrar.h" |
24 #include "ui/gfx/android/gfx_jni_registrar.h" | 24 #include "ui/gfx/android/gfx_jni_registrar.h" |
25 #endif | 25 #endif |
26 | 26 |
27 using::testing::Invoke; | 27 using::testing::Invoke; |
28 using::testing::Return; | 28 using::testing::Return; |
29 using::testing::_; | 29 using::testing::_; |
30 | 30 |
31 namespace { | 31 namespace { |
32 const char kTitle[] = "Title"; | 32 const char kTitle[] = "Title"; |
33 const char kContent[] = "Content"; | 33 const char kContent[] = "Content"; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 EXPECT_EQ(kContent, proto_->html()); | 160 EXPECT_EQ(kContent, proto_->html()); |
161 EXPECT_EQ(kURL, proto_->url()); | 161 EXPECT_EQ(kURL, proto_->url()); |
162 EXPECT_EQ(2, proto_->image_size()); | 162 EXPECT_EQ(2, proto_->image_size()); |
163 EXPECT_EQ(kImageData0, proto_->image(0).data()); | 163 EXPECT_EQ(kImageData0, proto_->image(0).data()); |
164 EXPECT_EQ(kId0, proto_->image(0).name()); | 164 EXPECT_EQ(kId0, proto_->image(0).name()); |
165 EXPECT_EQ(kImageData1, proto_->image(1).data()); | 165 EXPECT_EQ(kImageData1, proto_->image(1).data()); |
166 EXPECT_EQ(kId1, proto_->image(1).name()); | 166 EXPECT_EQ(kId1, proto_->image(1).name()); |
167 } | 167 } |
168 | 168 |
169 } // namespace dom_distiller | 169 } // namespace dom_distiller |
OLD | NEW |