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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/guid.h" | 8 #include "base/guid.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 const unsigned kDarkToolbarThemeColor = 0xFF1A1A1A; | 79 const unsigned kDarkToolbarThemeColor = 0xFF1A1A1A; |
80 | 80 |
81 const char kTestDistillerObject[] = | 81 const char kTestDistillerObject[] = |
82 "window.domAutomationController.send(" | 82 "window.domAutomationController.send(" |
83 "typeof distiller == 'object')"; | 83 "typeof distiller == 'object')"; |
84 | 84 |
85 void AddEntry(const ArticleEntry& e, FakeDB<ArticleEntry>::EntryMap* map) { | 85 void AddEntry(const ArticleEntry& e, FakeDB<ArticleEntry>::EntryMap* map) { |
86 (*map)[e.entry_id()] = e; | 86 (*map)[e.entry_id()] = e; |
87 } | 87 } |
88 | 88 |
89 ArticleEntry CreateEntry(std::string entry_id, std::string page_url) { | 89 ArticleEntry CreateEntry(const std::string& entry_id, |
| 90 const std::string& page_url) { |
90 ArticleEntry entry; | 91 ArticleEntry entry; |
91 entry.set_entry_id(entry_id); | 92 entry.set_entry_id(entry_id); |
92 if (!page_url.empty()) { | 93 if (!page_url.empty()) { |
93 ArticleEntryPage* page = entry.add_pages(); | 94 ArticleEntryPage* page = entry.add_pages(); |
94 page->set_url(page_url); | 95 page->set_url(page_url); |
95 } | 96 } |
96 return entry; | 97 return entry; |
97 } | 98 } |
98 | 99 |
99 } // namespace | 100 } // namespace |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 EXPECT_EQ("dark serif", result); | 609 EXPECT_EQ("dark serif", result); |
609 EXPECT_EQ(kDarkToolbarThemeColor, contents->GetThemeColor()); | 610 EXPECT_EQ(kDarkToolbarThemeColor, contents->GetThemeColor()); |
610 | 611 |
611 EXPECT_TRUE(content::ExecuteScriptAndExtractString( | 612 EXPECT_TRUE(content::ExecuteScriptAndExtractString( |
612 contents, kGetFontSize, &result)); | 613 contents, kGetFontSize, &result)); |
613 base::StringToDouble(result, &fontSize); | 614 base::StringToDouble(result, &fontSize); |
614 ASSERT_FLOAT_EQ(kScale, fontSize/oldFontSize); | 615 ASSERT_FLOAT_EQ(kScale, fontSize/oldFontSize); |
615 } | 616 } |
616 | 617 |
617 } // namespace dom_distiller | 618 } // namespace dom_distiller |
OLD | NEW |