Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc

Issue 1358783002: Cleanup: Pass std::string as const reference from chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase against ToT Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698