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

Side by Side Diff: gpu/command_buffer/tests/egl_test.cc

Issue 1640243002: command_buffer_gles2: Add test command_buffer_gles2_test for command_buffer_gles2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove debug Created 4 years, 10 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "testing/gmock/include/gmock/gmock.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7
8 #include <EGL/egl.h>
9
10 // This file tests EGL basic interface for command_buffer_gles2, the mode of
11 // command buffer where the code is compiled as a standalone dynamic library and
12 // exposed through EGL API.
13 namespace gpu {
14
15 using testing::Test;
16
17 TEST_F(Test, BasicEGLInitialization) {
18 EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
19 ASSERT_NE(display, EGL_NO_DISPLAY);
20
21 // Test for no crash even though passing nullptrs for major, minor.
22 EGLBoolean success = eglInitialize(display, nullptr, nullptr);
23 ASSERT_TRUE(success);
24
25 EGLint major = 0;
26 EGLint minor = 0;
27 success = eglInitialize(display, &major, &minor);
28 ASSERT_TRUE(success);
29 ASSERT_EQ(major, 1);
30 ASSERT_EQ(minor, 4);
31
32 success = eglTerminate(display);
33 ASSERT_TRUE(success);
34 }
35
36 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/command_buffer_gles2_tests_main.cc ('k') | gpu/command_buffer_gles2_tests_apk.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698