forked from sanyaade-mobiledev/chromium.src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move existing Mojo JS <--> CPP tests out of webui test harness.
The mojo webui test in content_browsertests was not the proper place to perform bindings-related fuzzing (though it was initially convenient). As a first step, move the existing tests to the new "framework" sky added in https://src.chromium.org/viewvc/chrome?revision=267208&view=revision This also restores the webui code to something near its original purpose, although I've kept a few of the hooks that may be useful as real webui tests are added. R=sky@chromium.org Review URL: https://codereview.chromium.org/268593002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267703 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
tsepez@chromium.org
committed
May 2, 2014
1 parent
0a54cd5
commit b4d4bbb
Showing
7 changed files
with
273 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,13 @@ | ||
module mojo { | ||
|
||
// This struct encompasses all of the basic types, so that they | ||
// may be sent from C++ to JS and back for validation. | ||
struct EchoArgs { | ||
int64 si64; | ||
int32 si32; | ||
int16 si16; | ||
int8 si8; | ||
uint64 ui64; | ||
uint32 ui32; | ||
uint16 ui16; | ||
uint8 ui8; | ||
float float_val; | ||
float float_inf; | ||
float float_nan; | ||
double double_val; | ||
double double_inf; | ||
double double_nan; | ||
string name; | ||
string[] string_array; | ||
}; | ||
|
||
[Peer=RendererTarget] | ||
interface BrowserTarget { | ||
PingResponse(); | ||
EchoResponse(EchoArgs arg1, EchoArgs arg2); | ||
}; | ||
|
||
[Peer=BrowserTarget] | ||
interface RendererTarget { | ||
Ping(); | ||
Echo(EchoArgs arg); | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
module js_to_cpp { | ||
|
||
// This struct encompasses all of the basic types, so that they | ||
// may be sent from C++ to JS and back for validation. | ||
struct EchoArgs { | ||
int64 si64; | ||
int32 si32; | ||
int16 si16; | ||
int8 si8; | ||
uint64 ui64; | ||
uint32 ui32; | ||
uint16 ui16; | ||
uint8 ui8; | ||
float float_val; | ||
float float_inf; | ||
float float_nan; | ||
double double_val; | ||
double double_inf; | ||
double double_nan; | ||
string name; | ||
string[] string_array; | ||
}; | ||
|
||
[Peer=JsSide] | ||
interface CppSide { | ||
StartTest(); // Sent to notify that the JS side is now ready. | ||
PingResponse(); | ||
EchoResponse(EchoArgs arg1, EchoArgs arg2); | ||
}; | ||
|
||
[Peer=CppSide] | ||
interface JsSide { | ||
Ping(); | ||
Echo(EchoArgs arg); | ||
}; | ||
|
||
} |
Oops, something went wrong.