Bug 143047 - REGRESSION(r181844): [GTK] Test /webkit2/WebKitWebInspectorServer/test-open-debugging-session fails after r181844
Summary: REGRESSION(r181844): [GTK] Test /webkit2/WebKitWebInspectorServer/test-open-d...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, Regression
Depends on:
Blocks:
 
Reported: 2015-03-25 02:26 PDT by Carlos Garcia Campos
Modified: 2015-04-12 23:36 PDT (History)
2 users (show)

See Also:


Attachments
Screenshot showing the console errors (107.51 KB, image/png)
2015-04-08 06:43 PDT, Carlos Garcia Campos
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2015-03-25 02:26:19 PDT
TEST: ./Tools/gtk/../../WebKitBuild/Release/bin/TestWebKitAPI/WebKit2Gtk/TestInspectorServer... (pid=5804)

  /webkit2/WebKitWebInspectorServer/test-page-list:                    OK

  /webkit2/WebKitWebInspectorServer/test-remote-debugging-message:     OK

  /webkit2/WebKitWebInspectorServer/test-open-debugging-session:       **

ERROR:../../Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp:241:void openRemoteDebuggingSession(InspectorServerTest*, gconstpointer): assertion failed: (javascriptResult)

FAIL

I haven't had time to investigate the issue.
Comment 1 Joseph Pecoraro 2015-03-25 09:49:14 PDT
So we fixed an early runtime error in the frontend soon after that:
http://trac.webkit.org/changeset/181905

Can you see if this test still fails after that revision?
Comment 2 Carlos Garcia Campos 2015-04-02 01:26:15 PDT
(In reply to comment #1)
> So we fixed an early runtime error in the frontend soon after that:
> http://trac.webkit.org/changeset/181905
> 
> Can you see if this test still fails after that revision?

Yes, remote inspector is still broken. I see a lot of js errors in the console, like:

TypeError: undefined is not an object (evaluating 'this.modifierKeys.altKey')
TypeError: undefined is not an object (evaluating 'WebInspector.Resizer.RuleOrientation.Vertical')

It seems to me that the remote inspector is trying to load the non-remote ui or something like that.
Comment 3 Joseph Pecoraro 2015-04-07 14:14:40 PDT
(In reply to comment #2)
> (In reply to comment #1)
> > So we fixed an early runtime error in the frontend soon after that:
> > http://trac.webkit.org/changeset/181905
> > 
> > Can you see if this test still fails after that revision?
> 
> Yes, remote inspector is still broken. I see a lot of js errors in the
> console, like:

It sounds like you're running into an early error. For instance:

> TypeError: undefined is not an object (evaluating 'this.modifierKeys.altKey')

This sounds like:

    WebInspector._updateModifierKeys = function(event)
    {
        var didChange = this.modifierKeys.altKey !== event.altKey || this.modifierKeys.metaKey !== event.metaKey || this.modifierKeys.shiftKey !== event.shiftKey;
        ...
    };

Somehow this code got called and either "this" or "this.modifierKeys" was undefined. That shouldn't happen, modifierKeys is initialized in WebInspector.contentLoaded.



> TypeError: undefined is not an object (evaluating
> 'WebInspector.Resizer.RuleOrientation.Vertical')

This should be defined via Resizer.js.


> It seems to me that the remote inspector is trying to load the non-remote ui
> or something like that.

- Are there earlier errors? The earliest error may give an indication as what is going on!
- Are ES6 classes supported in the browser showing the remote inspector?
- Maybe Symbol is not supported? Timothy Hatcher has a patch that monkey-patches that in to a degree:
Adding a window.Symbol to InspectorFrontendHostStub.js

I suspect it is window.Symbol issues.
Comment 4 Carlos Garcia Campos 2015-04-08 00:07:20 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > So we fixed an early runtime error in the frontend soon after that:
> > > http://trac.webkit.org/changeset/181905
> > > 
> > > Can you see if this test still fails after that revision?
> > 
> > Yes, remote inspector is still broken. I see a lot of js errors in the
> > console, like:
> 
> It sounds like you're running into an early error. For instance:
> 
> > TypeError: undefined is not an object (evaluating 'this.modifierKeys.altKey')
> 
> This sounds like:
> 
>     WebInspector._updateModifierKeys = function(event)
>     {
>         var didChange = this.modifierKeys.altKey !== event.altKey ||
> this.modifierKeys.metaKey !== event.metaKey || this.modifierKeys.shiftKey
> !== event.shiftKey;
>         ...
>     };
> 
> Somehow this code got called and either "this" or "this.modifierKeys" was
> undefined. That shouldn't happen, modifierKeys is initialized in
> WebInspector.contentLoaded.

It's this.modifierKeys, I managed to fix this particular issue by moving the initialization of this.modifierKeys earlier in WebInspector.contentLoaded.

> 
> 
> > TypeError: undefined is not an object (evaluating
> > 'WebInspector.Resizer.RuleOrientation.Vertical')
> 
> This should be defined via Resizer.js.

Yes, tried something similar but it didn't work.

> 
> > It seems to me that the remote inspector is trying to load the non-remote ui
> > or something like that.
> 
> - Are there earlier errors? The earliest error may give an indication as
> what is going on!

I think those were the first ones, but I'll try again.

> - Are ES6 classes supported in the browser showing the remote inspector?

I used the MiniBrowser for both.

> - Maybe Symbol is not supported? Timothy Hatcher has a patch that
> monkey-patches that in to a degree:
> Adding a window.Symbol to InspectorFrontendHostStub.js
> 
> I suspect it is window.Symbol issues.

I'll try, thanks.
Comment 5 Carlos Garcia Campos 2015-04-08 06:43:16 PDT
Created attachment 250348 [details]
Screenshot showing the console errors

These are the errors I'm getting
Comment 6 Carlos Garcia Campos 2015-04-08 06:44:12 PDT
There are indeed several Can't find variable: Symbol.
Comment 7 Carlos Garcia Campos 2015-04-08 06:45:40 PDT
Local inspector works perfectly, FWIW.
Comment 8 Carlos Garcia Campos 2015-04-12 23:36:33 PDT
It seems this has been fixed by r182653. It was indeed the Symbol issue, thanks Joseph for your help.