| 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 <string.h> | 5 #include <string.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "components/dom_distiller/core/dom_distiller_service.h" | 28 #include "components/dom_distiller/core/dom_distiller_service.h" |
| 29 #include "components/dom_distiller/core/dom_distiller_store.h" | 29 #include "components/dom_distiller/core/dom_distiller_store.h" |
| 30 #include "components/dom_distiller/core/dom_distiller_switches.h" | 30 #include "components/dom_distiller/core/dom_distiller_switches.h" |
| 31 #include "components/dom_distiller/core/dom_distiller_test_util.h" | 31 #include "components/dom_distiller/core/dom_distiller_test_util.h" |
| 32 #include "components/dom_distiller/core/fake_distiller.h" | 32 #include "components/dom_distiller/core/fake_distiller.h" |
| 33 #include "components/dom_distiller/core/fake_distiller_page.h" | 33 #include "components/dom_distiller/core/fake_distiller_page.h" |
| 34 #include "components/dom_distiller/core/task_tracker.h" | 34 #include "components/dom_distiller/core/task_tracker.h" |
| 35 #include "components/dom_distiller/core/url_constants.h" | 35 #include "components/dom_distiller/core/url_constants.h" |
| 36 #include "components/dom_distiller/core/url_utils.h" | 36 #include "components/dom_distiller/core/url_utils.h" |
| 37 #include "components/leveldb_proto/testing/fake_db.h" | 37 #include "components/leveldb_proto/testing/fake_db.h" |
| 38 #include "components/strings/grit/components_strings.h" |
| 38 #include "content/public/browser/render_view_host.h" | 39 #include "content/public/browser/render_view_host.h" |
| 39 #include "content/public/browser/url_data_source.h" | 40 #include "content/public/browser/url_data_source.h" |
| 40 #include "content/public/browser/web_contents.h" | 41 #include "content/public/browser/web_contents.h" |
| 41 #include "content/public/browser/web_contents_observer.h" | 42 #include "content/public/browser/web_contents_observer.h" |
| 42 #include "content/public/common/isolated_world_ids.h" | 43 #include "content/public/common/isolated_world_ids.h" |
| 43 #include "content/public/test/browser_test_utils.h" | 44 #include "content/public/test/browser_test_utils.h" |
| 44 #include "grit/components_strings.h" | |
| 45 #include "testing/gmock/include/gmock/gmock.h" | 45 #include "testing/gmock/include/gmock/gmock.h" |
| 46 #include "testing/gtest/include/gtest/gtest.h" | 46 #include "testing/gtest/include/gtest/gtest.h" |
| 47 #include "ui/base/l10n/l10n_util.h" | 47 #include "ui/base/l10n/l10n_util.h" |
| 48 | 48 |
| 49 namespace dom_distiller { | 49 namespace dom_distiller { |
| 50 | 50 |
| 51 using leveldb_proto::test::FakeDB; | 51 using leveldb_proto::test::FakeDB; |
| 52 using test::FakeDistiller; | 52 using test::FakeDistiller; |
| 53 using test::MockDistillerPage; | 53 using test::MockDistillerPage; |
| 54 using test::MockDistillerFactory; | 54 using test::MockDistillerFactory; |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 EXPECT_EQ("dark serif", result); | 646 EXPECT_EQ("dark serif", result); |
| 647 EXPECT_EQ(kDarkToolbarThemeColor, contents->GetThemeColor()); | 647 EXPECT_EQ(kDarkToolbarThemeColor, contents->GetThemeColor()); |
| 648 | 648 |
| 649 EXPECT_TRUE(content::ExecuteScriptAndExtractString( | 649 EXPECT_TRUE(content::ExecuteScriptAndExtractString( |
| 650 contents, kGetFontSize, &result)); | 650 contents, kGetFontSize, &result)); |
| 651 base::StringToDouble(result, &fontSize); | 651 base::StringToDouble(result, &fontSize); |
| 652 ASSERT_FLOAT_EQ(kScale, fontSize/oldFontSize); | 652 ASSERT_FLOAT_EQ(kScale, fontSize/oldFontSize); |
| 653 } | 653 } |
| 654 | 654 |
| 655 } // namespace dom_distiller | 655 } // namespace dom_distiller |
| OLD | NEW |