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

Side by Side Diff: Source/web/tests/ChromeClientImplTest.cpp

Issue 22955006: Chrome::client() should return a ChromeClient reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebViewImpl.cpp ('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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 : m_result(WebNavigationPolicyIgnore) 81 : m_result(WebNavigationPolicyIgnore)
82 , m_webViewClient(&m_result) 82 , m_webViewClient(&m_result)
83 { 83 {
84 } 84 }
85 85
86 protected: 86 protected:
87 virtual void SetUp() 87 virtual void SetUp()
88 { 88 {
89 m_webView = static_cast<WebViewImpl*>(WebView::create(&m_webViewClient)) ; 89 m_webView = static_cast<WebViewImpl*>(WebView::create(&m_webViewClient)) ;
90 m_webView->initializeMainFrame(&m_webFrameClient); 90 m_webView->initializeMainFrame(&m_webFrameClient);
91 m_chromeClientImpl = static_cast<ChromeClientImpl*>(m_webView->page()->c hrome().client()); 91 m_chromeClientImpl = static_cast<ChromeClientImpl*>(&m_webView->page()-> chrome().client());
92 m_result = WebNavigationPolicyIgnore; 92 m_result = WebNavigationPolicyIgnore;
93 } 93 }
94 94
95 virtual void TearDown() 95 virtual void TearDown()
96 { 96 {
97 m_webView->close(); 97 m_webView->close();
98 } 98 }
99 99
100 WebNavigationPolicy getNavigationPolicyWithMouseEvent(int modifiers, WebMous eEvent::Button button, bool asPopup) 100 WebNavigationPolicy getNavigationPolicyWithMouseEvent(int modifiers, WebMous eEvent::Button button, bool asPopup)
101 { 101 {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 TEST_F(GetNavigationPolicyTest, NotResizableForcesPopup) 259 TEST_F(GetNavigationPolicyTest, NotResizableForcesPopup)
260 { 260 {
261 m_chromeClientImpl->setResizable(false); 261 m_chromeClientImpl->setResizable(false);
262 EXPECT_TRUE(isNavigationPolicyPopup()); 262 EXPECT_TRUE(isNavigationPolicyPopup());
263 m_chromeClientImpl->setResizable(true); 263 m_chromeClientImpl->setResizable(true);
264 EXPECT_FALSE(isNavigationPolicyPopup()); 264 EXPECT_FALSE(isNavigationPolicyPopup());
265 } 265 }
266 266
267 } // namespace 267 } // namespace
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698