20 Commits

Author SHA1 Message Date
Tony Gentilcore
8c6f9a4a57 Fix inspector unittests.
BUG=
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/821643007
2015-01-14 11:32:24 -08:00
Tony Gentilcore
3cce869dd5 Convert the inspector framework to use ES6 classes.
BUG=
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/837933003
2015-01-13 18:49:43 -08:00
James Robinson
375d0f44e0 Remove client relationship between sky::Inspector{Front,Back}end
This removes the client relationship between the sky::InspectorFrontend
and sky::InspectorBackend mojo interfaces. Instead, the two are now
unrelated (in the mojom) and just happen to be often used together.
The inspector service provides the InspectorFrontend interface to
connecting applications and optimistically tries to connect to the
InspectorBackend interface of applications that connect, in case they
want to receive messages.  The front and back end interfaces are both
broadcast APIs, so no attempt is made to keep track of which binding
is which. If they did need to be correlated this could be easily
accomplished by allocating a new object to keep a
mojo::Binding<sky::InspectorFrontend> and the corresponding
sky::InspectorBackendPtr.

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

Review URL: https://codereview.chromium.org/835463003
2015-01-09 14:50:39 -08:00
Yury Semikhatsky
b22d85f975 Populate scope sections with variable name/values
Now when debugger is paused scope sections are properly populated with corresponding name:value pairs for all variables.

Eventually InjectedScript may become something like a regular Sky module but at the moment I don't see how to do this gracefully given that it is parametrised by InjectedScriptHost binding. So at the moment I just store it in "injectedScript" property on the global object,

BUG=435243
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/766683005
2014-11-27 21:00:06 +03:00
Yury Semikhatsky
e599443dc2 Don't send duplicate responses for debugger commands in Sky
This fixes following error in DevTools front-end:
"Protocol Error: the message with wrong id. "
and makes breakpoint persist between debugging sessions.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/746453002
2014-11-20 20:17:18 +03:00
Eric Seidel
c04c091978 Make breakpoints not crash sky
They still don't work, but at least they don't crash.

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/742583004
2014-11-18 17:39:21 -08:00
Eric Seidel
0ca1069cd4 Add support for Page.getResourceTree
Unfortunately we don't yet have a way to walk into
imports, so this only is the first-level of the
source tree, but this is a huge step forward.

You can now click to set breakpoints, however
setting breakpoints crashes sky.

I had to fix Console.log to flush stdout
so that I could actually debug my timing-out test.

Also had to fix Chai to dump differences for deepEqual.

R=esprehn@chromium.org, abarth@chromium.org, esprhen@chromium.org

Review URL: https://codereview.chromium.org/732413004
2014-11-18 15:53:13 -08:00
Eric Seidel
593c8f8de3 Wire up more of the DebuggerAgent
The debugger can now correctly break on exceptions
and show the corresponding line in the inspector.

It correctly understands which scripts are internal
to sky and does not pause during them.

There is still a ton to make work here
(including stacktraces which I have not tested),
but basic functionality seems to work.

The current implementation is not smart enough to
unpause the inspector when the frontend disconnects.

BUG=434510,434513
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/727593004
2014-11-18 15:05:05 -08:00
Eric Seidel
a1bf7bae10 Make it possible to have multiple InspectorBackends
This will make it possible to connect a c++
inspector backend in addition to the JS one.

We lose the feature of running multiple inspector
servers in this patch, but we weren't using that feature
and could easily add it back if we plan to use it.

This patch has a *ton* of boilerplate code due
to crbug.com/431911, hopefully that will be fixed
soon and we can delete all the Impl nonsense.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/710043004
2014-11-11 10:29:21 -08:00
Adam Barth
4240a776a4 Replace <link rel="import"> with <import>
This CL is just a search-and-replace.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/694423002
2014-11-03 12:34:57 -08:00
Elliott Sprehn
5330701999 Remove Element#attributes.
We now implement getAttributes() such that it returns
a new set of Attr isntances on every call as well.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/697773002
2014-10-31 15:10:53 -07:00
Adam Barth
03114dfa7e Switch "html" Mojo modules to the Sky module system
These never really worked with HTML imports. This CL updates them to use a more
modern version of the Sky module system so we can delete the old this.exports
pattern.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/697723003
2014-10-31 14:46:40 -07:00
Adam Barth
e3d78d7306 Convert more this.exports to module.exports
TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/685323003
2014-10-29 15:25:41 -07:00
Adam Barth
83f05ff8bf Use module.exports rather than this.exports
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/687263005
2014-10-29 15:21:28 -07:00
Eric Seidel
46a584b4d3 Add a very minimal CSSAgent
Also fixed the exception caused by IndexedDB being
missing.  It was there, just not used by inspector.sky.

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

Review URL: https://codereview.chromium.org/662523003
2014-10-29 14:14:06 -07:00
Eric Seidel
9e09e175f9 Add basic console support to Sky's inspector.
I think longer-term we want to instead fork
InjectedScriptSource.js:
http://blink.lc/blink/tree/Source/core/inspector/InjectedScriptSource.js
since a ton of the "remote object" logic could be shared
between Blink and Sky here.

Since we're trying to talk exactly Chrome's inspector
protocol we should start from the Blink JS as much as possible.

That said, this is enough to get the Chrome devtools
inspector to talk to sky and have the console handle
basic commands!

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/674823003
2014-10-29 08:47:10 -07:00
Adam Barth
b1f39b7c1b Move framework/inspector/server to services/inspector
Moving the inspector WebSocket proxy server out of the framework directory
simplifies the mappings for the HTTP servers.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/687673004
2014-10-28 15:38:23 -07:00
Eric Seidel
6e77ef1031 Fix the inspector and integrate it with skydb
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/690433002
2014-10-28 13:18:17 -07:00
Adam Barth
e72e95ebf6 Re-enable the inspector tests
These work again.

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

Review URL: https://codereview.chromium.org/683083004
2014-10-28 12:54:22 -07:00
Adam Barth
f0c80dc8cc Add beginnings of an inspector backend for Sky
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/687673003
2014-10-28 10:46:47 -07:00