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

Issue 7204022: Revert 89626 - Support automatic javascript test registry in gtest when creating WebUI tests. (Closed)

Created:
9 years, 6 months ago by Sheridan Rawlins
Modified:
9 years, 6 months ago
Reviewers:
Sheridan Rawlins
CC:
chromium-reviews, pam+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Revert 89626 - Support automatic javascript test registry in gtest when 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)); } 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 Review URL: http://codereview.chromium.org/7087014 TBR=scr@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89627

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -184 lines) Patch
M .gitignore View 1 chunk +0 lines, -1 line 0 comments Download
A + chrome/browser/ui/webui/javascript2webui.js View 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/browser/ui/webui/web_ui_browsertest.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/web_ui_browsertest.cc View 3 chunks +3 lines, -45 lines 0 comments Download
M chrome/chrome_tests.gypi View 2 chunks +0 lines, -19 lines 0 comments Download
D chrome/test/data/webui/sample_pass.js View 1 chunk +0 lines, -27 lines 0 comments Download
D tools/js2webui.py View 1 chunk +0 lines, -90 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Sheridan Rawlins
9 years, 6 months ago (2011-06-19 17:55:58 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698