| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, an error in a javascript file would cause the error to be written
to the -gen.cc file and fed to the C++ compiler (rarely accepts such
output as valid C++). This change causes the generation build action to fail
and the error to be output to the stderr of the ninja process instead.
Also, stack traces are improved by annotating eval'd files with sourceURL
comments when running the generator.
BUG=None
Review URL: https://codereview.chromium.org/1299893002
Cr-Commit-Position: refs/heads/master@{#345964}
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When editing javascript gtest files, the generated C++ file that runs the
tests rarely changes. Not rewriting them avoids recompiles and
relinks of the test binary which speeds up incremental builds.
R=dmazzoni@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1129893004
Cr-Commit-Position: refs/heads/master@{#329187}
|
|
|
|
|
|
|
|
|
|
|
|
| |
files as opposed to being statically linked to the binary.
This is not currently supported on any architecture.
BUG=421063
Review URL: https://codereview.chromium.org/594603003
Cr-Commit-Position: refs/heads/master@{#301595}
|
|
|
|
|
|
|
|
|
|
|
| |
Since upgrading the builder to 10.8, it never failed again.
BUG=370551
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/401103006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284668 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Nico tells me that lldb is better than gdb. So give it a try.
BUG=370551
R=marja@chromium.org
Review URL: https://codereview.chromium.org/386913002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282607 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=none
TBR=marja@chromium.org
Review URL: https://codereview.chromium.org/375273002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281998 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=370551
R=marja@chromium.org
Review URL: https://codereview.chromium.org/377893002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281734 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Hopefully stderr contains the actual error message..
R=marja@chromium.org
BUG=370551
Review URL: https://codereview.chromium.org/362303002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281049 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hopefully this will let us capture the error message related to the
occasional build failures on mac
BUG=370551
R=marja@chromium.org
Review URL: https://codereview.chromium.org/364623002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280843 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=371692
Review URL: https://codereview.chromium.org/304793002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275260 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This takes one existing ChromeVox unit test and ports it to
run as a WebUI test in Chrome. It's a WebUI test because it
needs a full DOM to run in, even though it's otherwise most
similar to a unit test.
Only one change to the WebUI test system was needed - to
allow paths relative to the source root for library files for a
test. The other changes improve the error messages when
building, and add filenames to stack traces.
BUG=371692
NOTRY=true
Review URL: https://codereview.chromium.org/292313004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273577 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=372300
R=thakis@chromium.org,scr@chromium.org
Review URL: https://codereview.chromium.org/298703004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272164 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
per-test basis.
BUG=162740
Review URL: https://chromiumcodereview.appspot.com/11664011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177520 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is because python's subprocess.py excepts GetStdHandle(STD_INPUT_HANDLE) to return a valid handle and it seems ninja on Windows doesn't give one, causing the subprocess.call() to fail unless we request stdin to be redirected.
Also fix file handle lifetime in gypv8sh.py
When an exception is thrown, the file handle could still be open, causing an
exception while trying to remove it in the exception handler due to file locking
on Windows.
Note that the exception being generated is another problem but this exception in
the exception handler was masking the original error.
R=scr@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10388191
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137902 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure that:
- shebang is only present for executable files
- shebang is #!/usr/bin/env python
- __main__ is only present for executable files
- file's executable bit is coherent
Also fix EOF LF to be only one.
TBR=timurrrr@chromium.org
BUG=105108
TEST=
Review URL: http://codereview.chromium.org/8678023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111960 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I moved javascript2webui.js over to chrome/test/base/js2gtest.js and shared it
across webui and unit tests with an extra parameter for test type, which governs
the few differences, such as what to include/subclass from and the flavor of
gtest (TEST_F v. IN_PROC_BROWSER_TEST_F).
v8_unit_test implemented 2 main methods to make it work with the generated C++
- AddLibrary - loads the file in the test context
- RunJavascriptF - launches the runTest with the testFixture and testName,
coordinating with Error and ChromeSend to report results.
Helper functions:
- Error - watches for console.error, noting failure if seen.
- ChromeSend - pulls apart the result from the test_api's call to
chrome.send('testResult', [ok, msg])
R=arv@chromium.org
BUG=87820
TEST=unit_tests --gtest_filter=FrameworkUnitTest.*
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=108391
Review URL: http://codereview.chromium.org/8418015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108773 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow javascript unit tests using webui test_api framework.
I moved javascript2webui.js over to chrome/test/base/js2gtest.js and shared it
across webui and unit tests with an extra parameter for test type, which governs
the few differences, such as what to include/subclass from and the flavor of
gtest (TEST_F v. IN_PROC_BROWSER_TEST_F).
v8_unit_test implemented 2 main methods to make it work with the generated C++
- AddLibrary - loads the file in the test context
- RunJavascriptF - launches the runTest with the testFixture and testName,
coordinating with Error and ChromeSend to report results.
Helper functions:
- Error - watches for console.error, noting failure if seen.
- ChromeSend - pulls apart the result from the test_api's call to
chrome.send('testResult', [ok, msg])
R=arv@chromium.org
BUG=87820
TEST=unit_tests --gtest_filter=FrameworkUnitTest.*
Review URL: http://codereview.chromium.org/8418015
TBR=scr@chromium.org
Review URL: http://codereview.chromium.org/8440060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108407 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I moved javascript2webui.js over to chrome/test/base/js2gtest.js and shared it
across webui and unit tests with an extra parameter for test type, which governs
the few differences, such as what to include/subclass from and the flavor of
gtest (TEST_F v. IN_PROC_BROWSER_TEST_F).
v8_unit_test implemented 2 main methods to make it work with the generated C++
- AddLibrary - loads the file in the test context
- RunJavascriptF - launches the runTest with the testFixture and testName,
coordinating with Error and ChromeSend to report results.
Helper functions:
- Error - watches for console.error, noting failure if seen.
- ChromeSend - pulls apart the result from the test_api's call to
chrome.send('testResult', [ok, msg])
R=arv@chromium.org
BUG=87820
TEST=unit_tests --gtest_filter=FrameworkUnitTest.*
Review URL: http://codereview.chromium.org/8418015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108391 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Allow javascript files anywhere in the source tree - specifically in the same directory as the implementation files.
- Copy the files to '<(PRODUCT_DIR)/test_data/...' so that cros can copy these where they need to go for cross-platform testing using 'ebuild'
R=jhawkins@chromium.org
BUG=90907,89337
TEST=browser_tests --gtest_filter=OptionsWebUITest.*
Review URL: http://codereview.chromium.org/8333013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106833 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch turned out to be fairly large. Let me describe the ultimate goal:
- To write WebUI tests in javascript, with as little C++ as possible for the simple case, yet powerful enough to support more complicated cases. options.js illustrates the simple case, and print_preview.js illustrates the complicated case.
Original changes:
- Refactored test_tab_strip_observer into test_navigation_observer so that it could be used by itself without needing the TabInsertedAt logic, which PrintPreview needs when there's no TabContentsWrapper available.
- Added assertEqualsArray for comparing two arrays shallowly (javascript == fails).
- Provided logic in WebUIBrowserTest and in the javascript2webui.js generation script to allow browsing to a url with preload of injected javascript.
- Corrected test_navigation_observer to wait for the right notification before calling callback (which runs after the page's javascript is loaded but before its onload).
- Added guts to define OS_* ifdefs for javascript to test for disabling tests.
- Moved the handler from settings_browsertest.cc to settings.js
- use __proto__ when overriding chrome to allow other members to be seen (commandLineString, e.g.)
Additions made during review:
- Switched to generative mechanism: TEST_F, GEN, which output during generation, and register during runtime.
- JS fixtures provide configuration members
- Add configuration hooks to generate in C++ test function
- Output directly to .cc file rather than needing hand-made .cc file which includes the generated file.
- Changed preload to take testFixture and testName.
- include and use mock4js to ensure handler methods are called.
- auto-generate the typedef WebUIBrowserTest testFixture unless overridden.
R=jhawkins@chromium.org,dtseng@chromium.org
BUG=None
TEST=browser_tests --gtest_filter=SettingsWebUITest.*
Review URL: http://codereview.chromium.org/7237030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92084 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The goal was to support something as simple as the following, where the tests in the
javascript files would be 1st class GTESTs, supporting FLAKY_, DISABLED_, etc, and
registered at linker_initialization time.
WEB_UI_BROWSER_TEST_JS(WebUIBrowserTest, TestJSPass,
FILE_PATH_LITERAL("sample_passing.js")) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL));
}
This solution ended up being fairly fragile, and I ended up with a script to parse javascript (with the help of v8_shell) and generate an includable ...-inl.h file with the following for every test in the .js file specified in the |rules| section of tools/js2webui.py
IN_PROC_BROWSER_TEST_F(WebUIBrowserTestPass, testHelper) {
AddLibrary(FilePath(FILE_PATH_LITERAL("sample_pass.js")));
ASSERT_TRUE(RunJavascriptTest("testHelper"));
}
http://www.chromium.org/Home/domui-testing
BUG=82437
R=estade@chromium.org,jhawkins@chromium.org
TEST=browser_tests --gtest_filter=WebUIBrowserTest*
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89453
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89605
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89626
Review URL: http://codereview.chromium.org/7087014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91358 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
creating WebUI tests.
The goal was to support something as simple as the following, where the tests in the
javascript files would be 1st class GTESTs, supporting FLAKY_, DISABLED_, etc, and
registered at linker_initialization time.
WEB_UI_BROWSER_TEST_JS(WebUIBrowserTest, TestJSPass,
FILE_PATH_LITERAL("sample_passing.js")) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL));
}
WEB_UI_BROWSER_TEST_JS_FALSE(WebUIBrowserTest, TestJSFail,
FILE_PATH_LITERAL("sample_failing.js")) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL));
}
http://www.chromium.org/Home/domui-testing
In order to support linker init time, I had to modify path_service to support
Unregistration, and chrome_paths to allow multiple invocations.
BUG=82437
R=estade@chromium.org,jhawkins@chromium.org
TEST=browser_tests --gtest_filter=WebUIBrowserTest*
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89453
Review URL: http://codereview.chromium.org/7087014
TBR=scr@chromium.org
Review URL: http://codereview.chromium.org/7189052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89607 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The goal was to support something as simple as the following, where the tests in the
javascript files would be 1st class GTESTs, supporting FLAKY_, DISABLED_, etc, and
registered at linker_initialization time.
WEB_UI_BROWSER_TEST_JS(WebUIBrowserTest, TestJSPass,
FILE_PATH_LITERAL("sample_passing.js")) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL));
}
WEB_UI_BROWSER_TEST_JS_FALSE(WebUIBrowserTest, TestJSFail,
FILE_PATH_LITERAL("sample_failing.js")) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL));
}
http://www.chromium.org/Home/domui-testing
In order to support linker init time, I had to modify path_service to support
Unregistration, and chrome_paths to allow multiple invocations.
BUG=82437
R=estade@chromium.org,jhawkins@chromium.org
TEST=browser_tests --gtest_filter=WebUIBrowserTest*
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89453
Review URL: http://codereview.chromium.org/7087014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89605 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
creating WebUI tests.
- gypv8sh.py is breaking on Mac
http://build.chromium.org/p/chromium/builders/Mac10.5%20Tests%20%281%29/builds/8563/steps/update/logs/stdio
File "/b/build/slave/Mac10_5_Tests__1_/build/src/tools/gyp/pylib/gyp/input.py", line 1017, in ProcessVariablesAndConditionsInList
expanded = ExpandVariables(item, is_late, variables, build_file)
File "/b/build/slave/Mac10_5_Tests__1_/build/src/tools/gyp/pylib/gyp/input.py", line 684, in ExpandVariables
(contents, p.returncode))
Exception: Call to 'python ../tools/gypv8sh.py -i' returned exit status 1. while loading dependencies of src/chrome/browser/sync/tools/sync_tools.gyp while loading dependencies of src/build/all.gyp while trying to load src/build/all.gyp
Error: /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python src/build/gyp_chromium in /b/build/slave/Mac10_5_Tests__1_/build returned 1
The goal was to support something as simple as the following, where the tests in the
javascript files would be 1st class GTESTs, supporting FLAKY_, DISABLED_, etc, and
registered at linker_initialization time.
WEB_UI_BROWSER_TEST_JS(WebUIBrowserTest, TestJSPass,
FILE_PATH_LITERAL("sample_passing.js")) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL));
}
WEB_UI_BROWSER_TEST_JS_FALSE(WebUIBrowserTest, TestJSFail,
FILE_PATH_LITERAL("sample_failing.js")) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL));
}
http://www.chromium.org/Home/domui-testing
In order to support linker init time, I had to modify path_service to support
Unregistration, and chrome_paths to allow multiple invocations.
BUG=82437
R=estade@chromium.org,jhawkins@chromium.org
TEST=browser_tests --gtest_filter=WebUIBrowserTest*
Review URL: http://codereview.chromium.org/7087014
TBR=scr@chromium.org
Review URL: http://codereview.chromium.org/7193030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89460 0039d316-1c4b-4281-b951-d872f2087c98
|
|
The goal was to support something as simple as the following, where the tests in the
javascript files would be 1st class GTESTs, supporting FLAKY_, DISABLED_, etc, and
registered at linker_initialization time.
WEB_UI_BROWSER_TEST_JS(WebUIBrowserTest, TestJSPass,
FILE_PATH_LITERAL("sample_passing.js")) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL));
}
WEB_UI_BROWSER_TEST_JS_FALSE(WebUIBrowserTest, TestJSFail,
FILE_PATH_LITERAL("sample_failing.js")) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL));
}
http://www.chromium.org/Home/domui-testing
In order to support linker init time, I had to modify path_service to support
Unregistration, and chrome_paths to allow multiple invocations.
BUG=82437
R=estade@chromium.org,jhawkins@chromium.org
TEST=browser_tests --gtest_filter=WebUIBrowserTest*
Review URL: http://codereview.chromium.org/7087014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89453 0039d316-1c4b-4281-b951-d872f2087c98
|