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

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 64853004: Use high resolution icons where possible for streamlined hosted app icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_experiment_create_app_from_page
Patch Set: fix tests for linux Created 7 years 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
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 6
7 #include "base/memory/shared_memory.h" 7 #include "base/memory/shared_memory.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 2132 matching lines...) Expand 10 before | Expand all | Expand 10 after
2143 view()->OnCandidateWindowUpdated(); 2143 view()->OnCandidateWindowUpdated();
2144 view()->OnCandidateWindowHidden(); 2144 view()->OnCandidateWindowHidden();
2145 2145
2146 // Retrieve the content and check if it is expected. 2146 // Retrieve the content and check if it is expected.
2147 const int kMaxOutputCharacters = 50; 2147 const int kMaxOutputCharacters = 50;
2148 std::string output = UTF16ToUTF8( 2148 std::string output = UTF16ToUTF8(
2149 GetMainFrame()->contentAsText(kMaxOutputCharacters)); 2149 GetMainFrame()->contentAsText(kMaxOutputCharacters));
2150 EXPECT_EQ(output, "\nResult:showupdatehide"); 2150 EXPECT_EQ(output, "\nResult:showupdatehide");
2151 } 2151 }
2152 2152
2153 // Ensure the render view sends favicon url update events correctly.
2154 TEST_F(RenderViewImplTest, SendFaviconURLUpdateEvent) {
2155 // An event should be sent when a favicon url exists.
2156 LoadHTML("<html>"
2157 "<head>"
2158 "<link rel='icon' href='http://www.google.com/favicon.ico'>"
2159 "</head>"
2160 "</html>");
2161 EXPECT_TRUE(render_thread_->sink().GetFirstMessageMatching(
2162 ViewHostMsg_UpdateFaviconURL::ID));
2163 render_thread_->sink().ClearMessages();
2164
2165 // An event should not be sent if no favicon url exists. This is an assumption
2166 // made by some of Chrome's favicon handling.
2167 LoadHTML("<html>"
2168 "<head>"
2169 "</head>"
2170 "</html>");
2171 EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching(
2172 ViewHostMsg_UpdateFaviconURL::ID));
2173 }
2174
2153 } // namespace content 2175 } // namespace content
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698