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

Issue 8515016: WebUI test framework: fix Mock4JS verification, allow chrome.send passthrough. (Closed)

Created:
9 years, 1 month ago by Sheridan Rawlins
Modified:
9 years, 1 month ago
Reviewers:
flackr, wyck
CC:
chromium-reviews, Paweł Hajdan Jr., Dan Beam, Ryan Sleevi, vandebo (ex-Chrome)
Visibility:
Public.

Description

WebUI test framework: fix Mock4JS verification, allow chrome.send passthrough. 1) Add test for Bug 99970 Comment 6 & fix 2) Allow chrome.send to be mocked outside of preLoad call. 3) add chrome.originalSend to allow mocked messages to pass through to C++. Also to address need for .cc file to be correct for clang, and prevent ugliness in js with a lot of GEN lines, allow the header and .cc to not have a suffix, and the generated file to end in -gen.cc. While doing this, addressed crbug.com/102794 to put in <(INTERMEDIATE_DIR) preventing collisions across rules. R=flackr@chromium.org,wyck@chromium.org BUG=103740, 99970, 102794 TEST=browser_tests --gtest_filter=Mock4JS*.* AND ChromeSend*.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=109678 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=109711

Patch Set 1 #

Patch Set 2 : Add missing files. #

Patch Set 3 : Moved GEN to top and added comments. #

Patch Set 4 : 102794 Use <(INTERMEDIATE_DIR) and change generated file to -gen.cc so cc file can not have suffix. #

Patch Set 5 : Put method definitions in same order as declarations, include gmock since it's used. #

Total comments: 2

Patch Set 6 : Added #pragma once. #

Total comments: 2

Patch Set 7 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -16 lines) Patch
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 4 chunks +6 lines, -3 lines 0 comments Download
A chrome/test/data/webui/chrome_send_browsertest.h View 1 2 3 4 5 1 chunk +54 lines, -0 lines 0 comments Download
A chrome/test/data/webui/chrome_send_browsertest.cc View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/test/data/webui/chrome_send_browsertest.js View 1 2 3 1 chunk +70 lines, -0 lines 0 comments Download
A chrome/test/data/webui/mock4js_browsertest.js View 1 chunk +76 lines, -0 lines 0 comments Download
M chrome/test/data/webui/test_api.js View 7 chunks +52 lines, -13 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Sheridan Rawlins
9 years, 1 month ago (2011-11-10 22:46:25 UTC) #1
wyck
I see linux_chromeos_arm ICE'd on your try. I don't understand the rest of what happened. ...
9 years, 1 month ago (2011-11-11 00:51:34 UTC) #2
Sheridan Rawlins
I'm pretty sure that's unrelated, but I am getting clang errors. While addressing (creating separate ...
9 years, 1 month ago (2011-11-11 02:21:00 UTC) #3
flackr
LGTM with nit http://codereview.chromium.org/8515016/diff/1005/chrome/test/data/webui/chrome_send_browsertest.h File chrome/test/data/webui/chrome_send_browsertest.h (right): http://codereview.chromium.org/8515016/diff/1005/chrome/test/data/webui/chrome_send_browsertest.h#newcode5 chrome/test/data/webui/chrome_send_browsertest.h:5: #define CHROME_TEST_DATA_WEBUI_CHROME_SEND_BROWSERTEST_H_ + #pragma once
9 years, 1 month ago (2011-11-11 15:34:54 UTC) #4
Sheridan Rawlins
http://codereview.chromium.org/8515016/diff/1005/chrome/test/data/webui/chrome_send_browsertest.h File chrome/test/data/webui/chrome_send_browsertest.h (right): http://codereview.chromium.org/8515016/diff/1005/chrome/test/data/webui/chrome_send_browsertest.h#newcode5 chrome/test/data/webui/chrome_send_browsertest.h:5: #define CHROME_TEST_DATA_WEBUI_CHROME_SEND_BROWSERTEST_H_ On 2011/11/11 15:34:54, flackr wrote: > + ...
9 years, 1 month ago (2011-11-11 17:04:51 UTC) #5
Ryan Sleevi
http://codereview.chromium.org/8515016/diff/9002/chrome/chrome_tests.gypi File chrome/chrome_tests.gypi (right): http://codereview.chromium.org/8515016/diff/9002/chrome/chrome_tests.gypi#newcode2013 chrome/chrome_tests.gypi:2013: '<(INTERMEDIATE_DIR)/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen.cc', Just a minor nit - when using <(INTERMEDIATE_DIR), ...
9 years, 1 month ago (2011-11-11 18:48:39 UTC) #6
Sheridan Rawlins
http://codereview.chromium.org/8515016/diff/9002/chrome/chrome_tests.gypi File chrome/chrome_tests.gypi (right): http://codereview.chromium.org/8515016/diff/9002/chrome/chrome_tests.gypi#newcode2013 chrome/chrome_tests.gypi:2013: '<(INTERMEDIATE_DIR)/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen.cc', I like the similarity to the location under ...
9 years, 1 month ago (2011-11-11 19:07:46 UTC) #7
wyck
On 2011/11/10 22:46:25, Sheridan Rawlins wrote: LGTM
9 years, 1 month ago (2011-11-11 19:11:40 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scr@chromium.org/8515016/10004
9 years, 1 month ago (2011-11-11 20:47:28 UTC) #9
commit-bot: I haz the power
9 years, 1 month ago (2011-11-11 22:02:25 UTC) #10
Change committed as 109711

Powered by Google App Engine
This is Rietveld 408576698