86 Commits

Author SHA1 Message Date
Eric Seidel
6f33a75051 Add POST support to XHR as well as .status and statusText support
Also fixed all the XHR tests to actually run and work
I learned from elliot that the it function has to
take a "done" argument to be treated asynchronously.

My utf8 conversion is a hack, but we deleted
window.TextEncoder (it was a module) when we forked.
We could resurrect TextEncoder (and probably should)
but I've left that for a separate change.

I also augmented sky_server to have a special /echo_post
handler so we can test POST requests.

R=esprehn@chromium.org
BUG=

Review URL: https://codereview.chromium.org/810523002
2014-12-15 16:09:51 -08:00
James Robinson
d51de7b23a Add fake implementation of Surfaces service
BUG=
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/804693002
2014-12-15 12:16:31 -08:00
Ojan Vafai
0fcf250d03 Make reftests work for sky.
-Add a --testing flag to sky_viewer and cause it to paint into an
SkBitmap instead of a ganesh surface so we can get the pixels out.
-Add GetPixelsForTesting to layer.cc to actually grab out the pixels.
-Add a reftest and a mismatch reftest. They need a setTimeout after
the load event. Unclear why or what the right fix is. Maybe we should
give internals some way to force the paint? If we don't have the
setTimeout, we paint a white page (so we do a paint, but with no
content).
-Add a DisplayDelegate to Layer so that Viewer can decide whether
to use the real ganesh backend or the SkBitmap one without littering
the whole code-base with is_testing bools and logic.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/797063002
2014-12-12 16:45:49 -08:00
Ojan Vafai
f89114f222 Revert "Revert "Add image_diff from the chromium repo.""
This reverts commit 79d76b3da8f72ca3affaaaf2821b1d0bb212f522.

The BUILD.gn file needed a dep to //build/config/sanitizers:deps
in order to link under the asan build.

TBR=blundell@chromium.org

Review URL: https://codereview.chromium.org/804563002
2014-12-12 09:48:46 -08:00
Colin Blundell
7fb63ba1bd Revert "Add image_diff from the chromium repo."
This reverts commit ac5097e515ce8237ead2c89bc61dc914cb75313b.

Reason for revert:

Breaks compile on the ASan bot (e.g., http://build.chromium.org/p/client.mojo/builders/Mojo%20Linux%20ASan/builds/95/steps/mojob%20build/logs/stdio).

TBR=ojan

Review URL: https://codereview.chromium.org/800773002
2014-12-12 08:07:49 +01:00
Ojan Vafai
8971e980cd Prepare python code for reftests.
-s/-expected.html/-expected.sky/
-s/-expected-mismatch.html/-expected-mismatch.sky/
-In single_test_runner.py, get rid of the image hash checking
for reftests. It doesn't provide any value and just makes
getting reftests working more complicated.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/802573002
2014-12-11 15:24:02 -08:00
Ojan Vafai
63a8891e8d Add image_diff from the chromium repo.
This is needed for reference tests so we can diff images.
This is just a straight copy of the image diff in the
chromium repo.

R=eseidel@google.com, esprehn@chromium.org

Review URL: https://codereview.chromium.org/801443002
2014-12-11 15:21:29 -08:00
Colin Blundell
b5be4a0945 Restructure public side of navigation service.
This CL goes from this:
  //mojo/services/public/interfaces/navigation

to this:
  //mojo/services/navigation/public/interfaces

This CL also makes the Mojo-side changes necessary to roll this change into
Chromium.

TBR=beng

Review URL: https://codereview.chromium.org/796783002
2014-12-11 08:49:15 +01:00
Colin Blundell
ac99b9896f Restructure public side of input_events service.
This CL goes from this:
  //mojo/services/public/interfaces/input_events

to this:
  //mojo/services/input_events/public/interfaces

This CL also makes the Mojo-side changes necessary to roll this change into
Chromium.

TBR=beng

Review URL: https://codereview.chromium.org/788353002
2014-12-10 22:50:57 +01:00
Rafael Weinstein
f38f80c9f8 Enable/Unprefix Animations & Transitions, add basic tests
This patch remove the Web Animations & CSS Animation runtime flags (and enables both). Removes prefixed Aninamations & Transitions and adds some basic tests & test support API.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/760183003
2014-12-10 10:38:34 -08:00
Colin Blundell
3dc76a69df Restructure public side of view_manager service.
This CL goes from this:
//mojo/services/public/cpp/view_manager
//mojo/services/public/interfaces/view_manager

to this:
//mojo/services/view_manager/public/cpp
//mojo/services/view_manager/public/interfaces

This CL also makes the Mojo-side changes required to roll this change into
Chromium (for both view_manager and window_manager, which was converted in an
earlier CL but for which these updates were not made):
- Updates rev_sdk.py to pull over the new directory
- Updates //mojo/services/public/mojo_services_public.gyp

TBR=beng

Review URL: https://codereview.chromium.org/790623003
2014-12-10 14:16:27 +01:00
Ojan Vafai
c37e637852 Run sky tests more parallelized.
Now that we're off cherrypy, hopefully we can run more tests
in parallel without timeouts. This works well for me locally.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/786833002
2014-12-08 12:46:49 -08:00
James Robinson
29235bd8a2 Put code in //services/window_manager in namespace window_manager
R=sky@chromium.org

Review URL: https://codereview.chromium.org/788453002
2014-12-08 12:08:55 -08:00
Ojan Vafai
db877ecf4f Green sky tests on the asan bot.
Skipped tests were not getting skipped because
the code gets whether the build is a debug or release
build from the configuration commandline argument, but
the asan bots pass Release_asan. Instead, read the
debug vs. release state from gn args instead of inferring
it from the out directory.

R=eseidel@chromium.org, esprehn@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/754673003
2014-12-08 11:15:13 -08:00
Ojan Vafai
dd1ee1ade5 Change test_sky to use the buildbot step name as the testtype.
This should make the flakiness dashboard work again.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/780993002
2014-12-04 16:25:13 -08:00
Ojan Vafai
61d78bd869 Convert sky_server over to a go-based http server.
We keep seeing timeouts on the bots that seem to be due
to cherrypy dropping requests on the floor, which in turn
causes imports to stall, which causes the test to time out.
In local testing, I was able to reproduce the timeouts
and wasn't able to do so with the go-based server.

R=abarth@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/746373002
2014-12-04 16:10:09 -08:00
James Robinson
f6527512b0 Simplify the thunk targets since we don't support apps as components
Since we don't support using the component build to produce mojo apps,
we can simplify the build targets in a few ways:

*) every mojo_native_application must depend on the c system thunks,
so just make that part of the template instead of requiring the dep
*) there's no such thing as depending on gles2 headers from a component,
so delete the forwarding group.

Most targets that want to use the gles2 headers in a mojo context
want to depend on an implementation through the thunks, so
//mojo/public/c/gles2 does just that. A smaller number of targets (such
as the implementation of the thunks) want to just depend on the headers
but not an impl, so they can depend on //mojo/public/c/gles2:headers.
The //mojo/public/gles target isn't that useful since the only thing we
expose is a set of C entry points.

We can probably also simplify the c system targets, but that's trickier
due to more extensive use from the chromium side.

BUG=438701
R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/780733002
2014-12-03 16:25:09 -08:00
James Robinson
685a549229 Move window_manager service implementation to //services
R=erg@chromium.org

Review URL: https://codereview.chromium.org/765753003
2014-12-02 10:52:00 -08:00
James Robinson
84690ebeab Add tracing service and make the shell+sky_viewer+services talk to it
This adds a tracing service that can aggregate tracing data from
multiple sources and write a json file out to disk that trace-viewer can
understand. This also teaches the shell, sky_viewer, and various other
services how to register themselves with the tracing service and provide
tracing data on demand. Finally, this teaches the skydb prompt to tell
the tracing service to start/stop tracing when the 'trace' command is
issued.

The tracing service exposes two APIs, a collector interface and a
coordinator interface. The collector interface allows different entities
to register themselves as being capable of producing tracing data. The
coordinator interface allows asking the service to collect data from
all registered sources and flushing the collected data to disk.

The service keeps track of all open connections to registered sources
and broadcasts a request for data whenever the coordinator's Start
method is called, then aggregates all data send back into a single
trace file. In this patch, the tracing service simply gives all sources
1 second to return data then flushes to disk. Ideally it would keep
track of how many requests it sent out and give each source a certain
amount of time to respond but this is simple and works for most cases.

The tracing service can talk to any source that is capable of producing
data that the trace-viewer can handle, which is a broad set, but in
practice many programs will want to use //base/debug's tracing to
produce trace data. This adds code at //mojo/common:tracing_impl that
registers a collector hooked up to //base/debug's tracing system. This
can be dropped in to the mojo::ApplicationDelegate::Initialize()
implementation for most services and applications to easily enable
base tracing. Programs that don't use //base, or that want to register
additional data sources that can talk to trace viewer (perhaps providing
data that's more easily available from another thread, say) may want
to create additional connections to the tracing service.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/769963004
2014-12-01 16:31:03 -08:00
Ojan Vafai
1826b1a6fd Undo quoting from c86b07f409c4698eccf5042ee1985f13971aaabb.
Turns out it breaks the popen call and doesn't pass
the right thing. :(

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/766613002
2014-11-26 17:00:20 -08:00
Ojan Vafai
759c4387ac Fix test_sky commandline printing.
1. Print out the sky_server commandline as well so it's easy
to run the server without running test_sky.
2. Quote the --args-for arguments, so that they copy-paste
correctly.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/762703005
2014-11-26 16:24:08 -08:00
Adam Barth
ead67ecbbf Remove event targeting hack
Mojo's event targeting system has evolved to the point were we don't need this
ugly hack anymore.

R=ojan@chromium.org, erg@chromium.org

Review URL: https://codereview.chromium.org/762443002
2014-11-26 09:00:04 -08:00
James Robinson
973bb96d11 Move tracing_impl code to mojo/common
This moves the tracing code and mojoms from sky/viewer/services/ to
mojo/common/ in anticipation of refactoring these to be more widely
usable. This doesn't actually change behaviors yet.

BUG=436639
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/751303003
2014-11-25 16:23:42 -08:00
Adam Barth
e16b5b6655 Teach skydb about --release and --debug
Previously, skydb could be used only for Debug builds. As part of working on
graphics performance, I'd like to use it for release builds as well. This CL
teaches it to use the same configuration arguments as sky_server, test_sky, and
test_perf.

The downside of this CL is that you'll need to supply --debug in the common
case of working with a debug build.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/746473003
2014-11-20 14:39:55 -08:00
Scott Violet
90f1388f44 Makes views be initially hidden
This better matches what other toolkits do and lets the client
configure the view before we attempt to show something for it.

BUG=434429
TEST=covered by test
R=erg@chromium.org

Review URL: https://codereview.chromium.org/745743002
2014-11-20 13:04:25 -08:00
Ojan Vafai
df728320bf Change test type of flakiness dashboard uploads to match buildbot step name.
Flakiness dashboard assumed each buildbot step corresponds to one
test suite. So, it assumes the test type matches the buildbot
step name. This fix is somewhat hacky in that we won't be
able to make other test suites in mojob test upload to the
flakiness dashboard, but that's technical debt we already have
from smashing multiple test suites into one buildbot step.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/725993003
2014-11-19 12:26:53 -08:00
Elliot Glaysher
13d46ddaca Dispatch key events to the currently focused window.
This fixes the browser demo. You can now enter text into the URL bar.

BUG=431047
R=sky@chromium.org

Review URL: https://codereview.chromium.org/737913002
2014-11-19 10:39:24 -08:00
Eric Seidel
65219c7d65 Make skydb chromoting aware
Presumably we should push this logic down into mojo
instead of hacking around this at the script level.

But at least this makes skydb work better for now.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/743603004
2014-11-19 09:46:43 -08:00
Elliott Sprehn
0aa29129ab Give release builds more time.
Lets see if this removes the flake on the bots seen in sky tests. In
local testing it looks like sky_server's CherryPy becomes overloaded and
then the requests take a very long time to complete which makes the tests
timeout. I increased the timeout locally and it made the tests start
passing consistently when using high --repeat values.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/741603002
2014-11-18 18:03:36 -08:00
Ojan Vafai
e0de9cbe42 Add the ability to upload sky_tests to the flakiness dashboard.
Modify mojob.py to plumb through the arguments needed to upload
sky tests to the flakiness dashboard. A followup change will
need to modify the buildbot side to pass these arguments
to mojob.py.

R=abarth@chromium.org, jamesr@chromium.org

Review URL: https://codereview.chromium.org/726313007
2014-11-17 13:14:38 -08:00
Eric Seidel
38981ef393 Remove DEPS from sky
Also taught PRESUBMIT.py how to ignore DEPS for sky/
since gn check already covers everything we were using DEPS for.

R=abarth@chromium.org, jamesr@chromium.org

Review URL: https://codereview.chromium.org/737493002
2014-11-17 11:16:44 -08:00
Eric Seidel
a2798ccebd Add a little script for resurrecting pre-fork Blink files
Since Sky is checked directly into mojo and does not contain
Blink history, I knew of no easy way to resurrect Blink files.

In making the V8 debugger work, I had to bring back a ton
of files and thus wrote a script to help me do so.

Maybe others will find this useful.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/732193002
2014-11-17 11:08:49 -08:00
Ojan Vafai
7ba5f7bec8 Only write test baselines next to the test.
We don't have platforms, so we never want to create a
platform directory for test baselines.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/729573004
2014-11-14 13:56:49 -08:00
Benjamin Lerman
e1311d656d Change mojo application name to {name}.mojo
Also remove obsolete reference to gyp files.

R=abarth@chromium.org, brettw@chromium.org, aa@chromium.org

Review URL: https://codereview.chromium.org/713513002
2014-11-14 21:49:31 +01:00
Viet-Trung Luu
f04532944e Make test_sky output to (e.g.) out/Debug/layout-test-results instead of webkit/Debug/layout-test-results.
Also remove webkit/{Debug,Release} from the .gitignore.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/722913002
2014-11-12 16:55:42 -08:00
Eric Seidel
11c0649769 Add headers to gn/gni files for all of sky/engine
Also sorted the sources.

This stops sky/tools/missing_from_gn from complaining
about our headers being missing.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/715163002
2014-11-12 11:36:37 -08:00
Adam Barth
295f292722 Implement event sender service for testing
This service lets us send Mojo events during testing.

R=eseidel@chromium.org, esprehn@chromium.org

Review URL: https://codereview.chromium.org/716043002
2014-11-12 10:46:35 -08:00
Adam Barth
411a9113b8 Input events are broken in skydb
When we removed Aura from the build, we broke event targeting. This CL hacks
around the issue by blindly forwarding events from the root view to the content
view in skydb. Once we have proper event targeting, we should rip out this code.

R=erg@chromium.org

Review URL: https://codereview.chromium.org/714213003
2014-11-12 10:32:54 -08:00
Adam Barth
7a240abc13 Rename sky::TestObserver to sky::TestHarness
This CL prepares us to add event dispatching to this interface, which is more
than just observation.

R=esprehn@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/715123002
2014-11-11 16:43:21 -08:00
Elliot Glaysher
23babae2de Reland: Remove aura and make a pure mojo::View version of FocusController.
[Changes: Remove additional deps which Linux/Windows was fine with, but
which broke android because it implied an aura dependency. window_manager
should now be properly deauraed.]

This patch is only half done, however the main driver (removing aura) is
needed by other teams for them to make progress.

Input handling is regressed in this patch; while FocusController is
rebuilt to the point where it should theoretically work, all of the
details about ui::EventTargeter don't work correctly. There is an empty
subclass ViewTargeter which will need to be filled out before

Thankfully, this should only regress people who are using the wm_flow
demo, and this should unblock the android guys who don't have aura
support on their platform.

BUG=431047
TBR=eseidel@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/710203006
2014-11-10 17:06:49 -08:00
Elliot Glaysher
cf51d90a37 Revert "Remove aura and make a pure mojo::View version of the aura::Window FocusController."
This reverts commit bb29e4293b6e60ee721b5be17f9fa9f4989a1981.

This is a speculative revert due to android waterfall bots failing.

BUG=431047
TBR=ojan@chromium.org,sky@chromium.org

Review URL: https://codereview.chromium.org/718573002
2014-11-10 16:28:49 -08:00
Elliot Glaysher
e5278621eb Remove aura and make a pure mojo::View version of the aura::Window FocusController.
This patch is only half done, however the main driver (removing aura) is needed by other teams for them to make progress.

Input handling is regressed in this patch; while FocusController is rebuilt to the point where it should theoretically work, all of the details about ui::EventTargeter don't work correctly. There is an empty subclass ViewTargeter which will need to be filled out before

Thankfully, this should only regress people who are using the wm_flow demo, and this should unblock the android guys who don't have aura support on their platform.

BUG=431047
R=eseidel@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/698543005
2014-11-10 15:42:36 -08:00
Adam Barth
2c017360bc Make Sky's test_perf actually test performance
This CL teaches test_perf how to walk the benchmarks directory to find the
benchmarks and how to actually run them. We're still not uploading results to
the server yet, however.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/710133002
2014-11-10 10:30:54 -08:00
Eric Seidel
9eb275c267 Add back exit(0) until crbug.com/430581 can be resolved.
BUG=430581
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/693433005
2014-11-06 12:55:29 -08:00
Benjamin Lerman
2cdc639a09 Change mojo url to always use mojo:foo instead of mojo://foo
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/701933004
2014-11-06 17:23:18 +01:00
Eric Seidel
1cb381f6ac Teach sky_server how to use more threads and not drop requests
This is lame, but seems to fix the timeout problem
http://stackoverflow.com/questions/2685089/cherrypy-and-concurrency

Review URL: https://codereview.chromium.org/700213005
2014-11-05 15:25:35 -08:00
Eric Seidel
2ee8874f35 Bring skydebugger closer to clean-shutdown
This teaches the SkyDebugger prompt how to tell
the sky debugger (server) to shut down instead of
just calling exit(0).

This also teaches the WindowManagerApp (server) how
to tear down all of its connections itself instead
of depending on the pipes to do so (which would
crash when youd delete the WindowManagerApp as the
pipes could outlive it with WindowManagerImpl objects
containing raw pointers back to the WindowManagerApp).

Shutdown is not yet clean.  It errors out trying to
talk to the X11 server, but it's closer to clean
than it was prior to this change.  I may add back
and exit(0) to side-step shutdown until it can be
made fully clean.

R=jamesr@chromium.org, sky@chromium.org
BUG=430291, 430242

Review URL: https://codereview.chromium.org/695183003
2014-11-05 13:09:08 -08:00
Eric Seidel
a934c7fc09 Switch test_sky to sky_server
Adam did this in:
https://codereview.chromium.org/699333002
But later reverted in:
https://codereview.chromium.org/692333007

The problem was that the path to sky_server
was being computed relative to the sky
directory instead of being absolute, so when
the bots tried to run test_sky from the root
mojo directory instead of mojo/sky they failed.

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/704833002
2014-11-05 13:08:49 -08:00
Adam Barth
46a9ce7254 Switch test_sky back to apache
This CL reverts my previous change because it didn't work on the bots.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/692333007
2014-11-04 17:30:25 -08:00
Adam Barth
c6e28d12db Fix test_sky in release builds
This CL passes the configuration information from test_sky to sky_server so
that sky_server can find the correct output directory.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/705623003
2014-11-04 17:20:30 -08:00