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

Side by Side Diff: chrome/renderer/safe_browsing/phishing_thumbnailer_browsertest.cc

Issue 11066098: Fix a test which uses the RenderViewTest harness running in unit_test binaries. This gives an asser… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix deps Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/content_tests.gypi » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/renderer/safe_browsing/phishing_thumbnailer.h" 6 #include "chrome/renderer/safe_browsing/phishing_thumbnailer.h"
7 #include "content/public/test/render_widget_browsertest.h" 7 #include "content/public/test/render_widget_test.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
12 12
13 namespace safe_browsing { 13 namespace safe_browsing {
14 14
15 class ThumbnailerTest : public content::RenderWidgetTest { 15 class ThumbnailerTest : public content::RenderWidgetTest {
16 public: 16 public:
17 ThumbnailerTest() {} 17 ThumbnailerTest() {}
18 18
19 protected: 19 protected:
20 virtual void ResizeAndPaint(const gfx::Size& page_size, 20 virtual void ResizeAndPaint(const gfx::Size& page_size,
21 const gfx::Size& desired_size, 21 const gfx::Size& desired_size,
22 SkBitmap* snapshot) { 22 SkBitmap* snapshot) OVERRIDE {
23 ASSERT_TRUE(snapshot); 23 ASSERT_TRUE(snapshot);
24 *snapshot = GrabPhishingThumbnail(view_, page_size, desired_size); 24 *snapshot = GrabPhishingThumbnail(view_, page_size, desired_size);
25 EXPECT_FALSE(snapshot->isNull()); 25 EXPECT_FALSE(snapshot->isNull());
26 } 26 }
27 }; 27 };
28 28
29 TEST_F(ThumbnailerTest, GrabPhishingThumbnail) { 29 TEST_F(ThumbnailerTest, GrabPhishingThumbnail) {
30 TestResizeAndPaint(); 30 TestResizeAndPaint();
31 } 31 }
32 32
33 } // namespace safe_browsing 33 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698