This source file includes following definitions.
- IN_PROC_BROWSER_TEST_F
#include "content/browser/gpu/compositor_util.h"
#include "content/public/test/content_browser_test.h"
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
#elif defined(OS_WIN)
#include "base/win/windows_version.h"
#endif
namespace content {
typedef ContentBrowserTest CompositorUtilTest;
IN_PROC_BROWSER_TEST_F(CompositorUtilTest, CompositingModeAsExpected) {
enum CompositingMode {
DISABLED,
ENABLED,
THREADED,
DELEGATED,
} expected_mode = DISABLED;
#if defined(USE_AURA)
expected_mode = DELEGATED;
#elif defined(OS_ANDROID)
expected_mode = DELEGATED;
#elif defined(OS_MACOSX)
expected_mode = THREADED;
if (base::mac::IsOSLionOrEarlier())
return;
#elif defined(OS_WIN)
if (base::win::GetVersion() >= base::win::VERSION_VISTA)
expected_mode = THREADED;
#endif
EXPECT_EQ(expected_mode == ENABLED ||
expected_mode == THREADED ||
expected_mode == DELEGATED,
IsForceCompositingModeEnabled());
EXPECT_EQ(expected_mode == THREADED ||
expected_mode == DELEGATED,
IsThreadedCompositingEnabled());
EXPECT_EQ(expected_mode == DELEGATED,
IsDelegatedRendererEnabled());
}
}