blob: a894b2d03c1b3dc184066e7070c3f7423ebf618d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/basictypes.h"
#include "chrome/renderer/render_widget_browsertest.h"
#include "chrome/renderer/safe_browsing/phishing_thumbnailer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
namespace safe_browsing {
class ThumbnailerTest : public RenderWidgetTest {
public:
ThumbnailerTest() {}
protected:
virtual void ResizeAndPaint(const gfx::Size& page_size,
const gfx::Size& desired_size,
SkBitmap* snapshot) {
ASSERT_TRUE(snapshot);
*snapshot = GrabPhishingThumbnail(view_.get(), page_size, desired_size);
EXPECT_FALSE(snapshot->isNull());
}
};
TEST_F(ThumbnailerTest, GrabPhishingThumbnail) {
TestResizeAndPaint();
}
} // namespace safe_browsing
|