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

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

Issue 2918903002: Move IconURLs method from WebFrame to WebLocalFrame (Closed)
Patch Set: s/kFavIcon/kFavicon/g (as suggested in CR feedback from pkotwicz@). Created 3 years, 6 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_view_impl.h » ('j') | 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <tuple> 7 #include <tuple>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 1904
1905 // Ensure the render view sends favicon url update events correctly. 1905 // Ensure the render view sends favicon url update events correctly.
1906 TEST_F(RenderViewImplTest, SendFaviconURLUpdateEvent) { 1906 TEST_F(RenderViewImplTest, SendFaviconURLUpdateEvent) {
1907 // An event should be sent when a favicon url exists. 1907 // An event should be sent when a favicon url exists.
1908 LoadHTML("<html>" 1908 LoadHTML("<html>"
1909 "<head>" 1909 "<head>"
1910 "<link rel='icon' href='http://www.google.com/favicon.ico'>" 1910 "<link rel='icon' href='http://www.google.com/favicon.ico'>"
1911 "</head>" 1911 "</head>"
1912 "</html>"); 1912 "</html>");
1913 EXPECT_TRUE(render_thread_->sink().GetFirstMessageMatching( 1913 EXPECT_TRUE(render_thread_->sink().GetFirstMessageMatching(
1914 ViewHostMsg_UpdateFaviconURL::ID)); 1914 FrameHostMsg_UpdateFaviconURL::ID));
1915 render_thread_->sink().ClearMessages(); 1915 render_thread_->sink().ClearMessages();
1916 1916
1917 // An event should not be sent if no favicon url exists. This is an assumption 1917 // An event should not be sent if no favicon url exists. This is an assumption
1918 // made by some of Chrome's favicon handling. 1918 // made by some of Chrome's favicon handling.
1919 LoadHTML("<html>" 1919 LoadHTML("<html>"
1920 "<head>" 1920 "<head>"
1921 "</head>" 1921 "</head>"
1922 "</html>"); 1922 "</html>");
1923 EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching( 1923 EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching(
1924 ViewHostMsg_UpdateFaviconURL::ID)); 1924 FrameHostMsg_UpdateFaviconURL::ID));
1925 } 1925 }
1926 1926
1927 TEST_F(RenderViewImplTest, FocusElementCallsFocusedNodeChanged) { 1927 TEST_F(RenderViewImplTest, FocusElementCallsFocusedNodeChanged) {
1928 LoadHTML("<input id='test1' value='hello1'></input>" 1928 LoadHTML("<input id='test1' value='hello1'></input>"
1929 "<input id='test2' value='hello2'></input>"); 1929 "<input id='test2' value='hello2'></input>");
1930 1930
1931 ExecuteJavaScriptForTests("document.getElementById('test1').focus();"); 1931 ExecuteJavaScriptForTests("document.getElementById('test1').focus();");
1932 const IPC::Message* msg1 = render_thread_->sink().GetFirstMessageMatching( 1932 const IPC::Message* msg1 = render_thread_->sink().GetFirstMessageMatching(
1933 FrameHostMsg_FocusedNodeChanged::ID); 1933 FrameHostMsg_FocusedNodeChanged::ID);
1934 EXPECT_TRUE(msg1); 1934 EXPECT_TRUE(msg1);
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
2592 ExpectPauseAndResume(3); 2592 ExpectPauseAndResume(3);
2593 blink::WebScriptSource source2( 2593 blink::WebScriptSource source2(
2594 WebString::FromUTF8("function func2() { func1(); }; func2();")); 2594 WebString::FromUTF8("function func2() { func1(); }; func2();"));
2595 frame()->GetWebFrame()->ExecuteScriptInIsolatedWorld(17, &source2, 1); 2595 frame()->GetWebFrame()->ExecuteScriptInIsolatedWorld(17, &source2, 1);
2596 2596
2597 EXPECT_FALSE(IsPaused()); 2597 EXPECT_FALSE(IsPaused());
2598 Detach(); 2598 Detach();
2599 } 2599 }
2600 2600
2601 } // namespace content 2601 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698