• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4 
5 #ifndef CEF_TESTS_CEFTESTS_IMAGE_UTIL_H_
6 #define CEF_TESTS_CEFTESTS_IMAGE_UTIL_H_
7 #pragma once
8 
9 #include "include/cef_image.h"
10 
11 namespace image_util {
12 
13 // Load an PNG image. Tests that the size is |expected_size| in DIPs. Call
14 // multiple times to load the same image at different scale factors.
15 void LoadImage(CefRefPtr<CefImage> image,
16                double scale_factor,
17                const std::string& name,
18                const CefSize& expected_size);
19 
20 // Load an icon image. Expected size is 16x16 DIPs.
21 void LoadIconImage(CefRefPtr<CefImage> image,
22                    double scale_factor,
23                    const std::string& name = "window_icon");
24 
25 }  // namespace image_util
26 
27 #endif  // CEF_TESTS_CEFTESTS_IMAGE_UTIL_H_
28