Skip to content

Commit

Permalink
Port three nacl_integration tests to browser_tests.
Browse files Browse the repository at this point in the history
* ppapi_geturl
* ppapi_ppb_dev
* ppapi_ppp_instance

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2959


Review URL: https://chromiumcodereview.appspot.com/11035048

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160454 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
ncbray@chromium.org committed Oct 5, 2012
1 parent fc11285 commit 13257a9
Show file tree
Hide file tree
Showing 19 changed files with 99 additions and 136 deletions.
76 changes: 76 additions & 0 deletions chrome/test/data/nacl/nacl_test_data.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,33 @@
]
},
},
{
'target_name': 'ppapi_geturl',
'type': 'none',
'variables': {
'nexe_target': 'ppapi_geturl',
'build_newlib': 1,
'build_glibc': 1,
'link_flags': [
'-lppapi',
'-lplatform',
'-lgio',
],
'sources': [
'ppapi/geturl/module.cc',
'ppapi/geturl/ppapi_geturl.cc',
'ppapi/geturl/url_load_request.cc',
],
'test_files': [
'ppapi/geturl/ppapi_geturl.html',
'ppapi/geturl/ppapi_geturl_success.html',

],
},
'dependencies': [
'ppapi_test_lib',
],
},
{
'target_name': 'ppapi_ppb_core',
'type': 'none',
Expand All @@ -93,5 +120,54 @@
'ppapi_test_lib',
],
},
{
'target_name': 'ppapi_ppb_dev',
'type': 'none',
'variables': {
'nexe_target': 'ppapi_ppb_dev',
'build_newlib': 1,
'build_glibc': 1,
'link_flags': [
'-lppapi',
'-lppapi_test_lib',
'-lplatform',
'-lgio',
],
'sources': [
'ppapi/ppb_dev/ppapi_ppb_dev.cc',
],
'test_files': [
'ppapi/ppb_dev/ppapi_ppb_dev.html',
],
},
'dependencies': [
'ppapi_test_lib',
],
},
{
'target_name': 'ppapi_ppp_instance',
'type': 'none',
'variables': {
'nexe_target': 'ppapi_ppp_instance',
'build_newlib': 1,
'build_glibc': 1,
'link_flags': [
'-lppapi',
'-lppapi_test_lib',
'-lplatform',
'-lgio',
],
'sources': [
'ppapi/ppp_instance/ppapi_ppp_instance.cc',
],
'test_files': [
'ppapi/ppp_instance/ppapi_ppp_instance.html',
'ppapi/ppp_instance/ppapi_ppp_instance.js',
],
},
'dependencies': [
'ppapi_test_lib',
],
},
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "native_client/tests/ppapi_geturl/module.h"
#include "chrome/test/data/nacl/ppapi/geturl/module.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <string>

#include "chrome/test/data/nacl/ppapi/geturl/url_load_request.h"
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/include/portability.h"
#include "native_client/src/shared/platform/nacl_check.h"
#include "native_client/tests/ppapi_geturl/url_load_request.h"

#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2011 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.
#ifndef TESTS_PPAPI_GETURL_MODULE_H_
#define TESTS_PPAPI_GETURL_MODULE_H_
#ifndef CHROME_TEST_DATA_NACL_PPAPI_GETURL_MODULE_H_
#define CHROME_TEST_DATA_NACL_PPAPI_GETURL_MODULE_H_

#include <string>

Expand Down Expand Up @@ -59,4 +59,4 @@ class Module {
void operator=(const Module&);
};

#endif // TESTS_PPAPI_GETURL_MODULE_H_
#endif // CHROME_TEST_DATA_NACL_PPAPI_GETURL_MODULE_H_
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/ppb_instance.h"

#include "native_client/tests/ppapi_geturl/module.h"
#include "chrome/test/data/nacl/ppapi/geturl/module.h"

// Global PPP functions --------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "native_client/tests/ppapi_geturl/url_load_request.h"
#include "chrome/test/data/nacl/ppapi/geturl/url_load_request.h"

#include <stdio.h>
#include <string>
#include <sstream>

#include "chrome/test/data/nacl/ppapi/geturl/module.h"
#include "native_client/src/include/portability.h"
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/shared/platform/nacl_check.h"
#include "native_client/tests/ppapi_geturl/module.h"
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2012 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.
#ifndef TESTS_PPAPI_GETURL_URL_LOAD_REQUEST_H_
#define TESTS_PPAPI_GETURL_URL_LOAD_REQUEST_H_
#ifndef CHROME_TEST_DATA_NACL_PPAPI_GETURL_URL_LOAD_REQUEST_H_
#define CHROME_TEST_DATA_NACL_PPAPI_GETURL_URL_LOAD_REQUEST_H_

#include <string>
#include <vector>
Expand Down Expand Up @@ -76,4 +76,4 @@ class UrlLoadRequest {
int32_t read_offset_;
};

#endif // TESTS_PPAPI_GETURL_URL_LOAD_REQUEST_H_
#endif // CHROME_TEST_DATA_NACL_PPAPI_GETURL_URL_LOAD_REQUEST_H_
12 changes: 12 additions & 0 deletions chrome/test/nacl/nacl_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,20 @@ NACL_BROWSER_TEST_F(NaClBrowserTest, ExitStatus, {
"pm_exit_status_test.html?trigger=exitneg2&expected_exit=254"));
})

NACL_BROWSER_TEST_F(NaClBrowserTest, PPAPIGetUrl, {
RunNaClIntegrationTest(FILE_PATH_LITERAL("ppapi_geturl.html"));
})

NACL_BROWSER_TEST_F(NaClBrowserTest, PPAPICore, {
RunNaClIntegrationTest(FILE_PATH_LITERAL("ppapi_ppb_core.html"));
})

NACL_BROWSER_TEST_F(NaClBrowserTest, PPAPIDev, {
RunNaClIntegrationTest(FILE_PATH_LITERAL("ppapi_ppb_dev.html"));
})

NACL_BROWSER_TEST_F(NaClBrowserTest, PPAPIInstance, {
RunNaClIntegrationTest(FILE_PATH_LITERAL("ppapi_ppp_instance.html"));
})

} // namespace anonymous
5 changes: 0 additions & 5 deletions ppapi/native_client/ppapi_scons_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
'src/shared/ppapi/build.scons',
'src/shared/ppapi_proxy/build.scons',
'src/trusted/plugin/build.scons',
'tests/ppapi_geturl/build.scons',
'tests/ppapi_messaging/build.scons',
'tests/ppapi_browser/ppb_file_system/build.scons',
'tests/ppapi_tests/build.scons', # Build PPAPI tests from Chrome as a .so
Expand All @@ -34,17 +33,14 @@
'tests/ppapi_browser/extension_mime_handler/nacl.scons',
'tests/ppapi_browser/manifest/nacl.scons',
'tests/ppapi_browser/ppb_audio/nacl.scons',
'tests/ppapi_browser/ppb_dev/nacl.scons',
'tests/ppapi_browser/ppb_file_system/nacl.scons',
'tests/ppapi_browser/ppb_graphics2d/nacl.scons',
'tests/ppapi_browser/ppb_graphics3d/nacl.scons',
'tests/ppapi_browser/ppb_image_data/nacl.scons',
'tests/ppapi_browser/ppb_instance/nacl.scons',
'tests/ppapi_browser/ppb_memory/nacl.scons',
'tests/ppapi_browser/ppb_url_loader/nacl.scons',
'tests/ppapi_browser/ppb_var/nacl.scons',
'tests/ppapi_browser/ppp_input_event/nacl.scons',
'tests/ppapi_browser/ppp_instance/nacl.scons',
'tests/ppapi_browser/progress_events/nacl.scons',
'tests/ppapi_browser/stress_many_nexes/nacl.scons',
'tests/ppapi_example_2d/nacl.scons',
Expand All @@ -54,7 +50,6 @@
# http://code.google.com/p/nativeclient/issues/detail?id=2060
# 'tests/ppapi_example_gles2/nacl.scons',
'tests/ppapi_example_post_message/nacl.scons',
'tests/ppapi_geturl/nacl.scons',
'tests/ppapi_gles_book/nacl.scons',
'tests/ppapi_messaging/nacl.scons',
# Broken by Chrome change
Expand Down
42 changes: 0 additions & 42 deletions ppapi/native_client/tests/ppapi_browser/ppb_dev/nacl.scons

This file was deleted.

28 changes: 0 additions & 28 deletions ppapi/native_client/tests/ppapi_geturl/build.scons

This file was deleted.

50 changes: 0 additions & 50 deletions ppapi/native_client/tests/ppapi_geturl/nacl.scons

This file was deleted.

0 comments on commit 13257a9

Please sign in to comment.