Bug 43264

Summary: Web Inspector: inspector tests should be frontend-driven
Product: WebKit Reporter: Pavel Podivilov <podivilov>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: loislo, pfeldman, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Proposed patch.
none
Define inspector layout test as a sequence of steps.
none
Proposed patch.
none
Proposed patch. none

Description Pavel Podivilov 2010-07-30 11:15:47 PDT
Web Inspector: inspector tests should be frontend-driven
Comment 1 Pavel Podivilov 2010-07-30 11:27:25 PDT
Created attachment 63088 [details]
Proposed patch.
Comment 2 Pavel Podivilov 2010-07-31 03:59:12 PDT
Created attachment 63147 [details]
Define inspector layout test as a sequence of steps.
Comment 3 Yury Semikhatsky 2010-08-17 03:16:44 PDT
Comment on attachment 63088 [details]
Proposed patch.

LayoutTests/http/tests/inspector/inspector-test2.js:162
 +          "if (!InspectorTest) {",
!window.InspectorTest, otherwise you'll get an exception.

LayoutTests/http/tests/inspector/inspector-test2.js:174
 +      layoutTestController.evaluateInWebInspector(completeTestCallId, "true");
This roundtrip shouldn't be needed(at least at the new tests).

LayoutTests/http/tests/inspector/inspector-test2.js:69
 +  function createKeyEvent(keyIdentifier)
Let's move all these methods on to InspectorTest object so that it's easy to distinguish test methods from the rest of front-end methods.

LayoutTests/http/tests/inspector/inspector-test2.js:24
 +  InspectorTest.push = function(text)
maybe rename it to addResult?
Comment 4 Pavel Podivilov 2010-08-17 08:04:34 PDT
Created attachment 64594 [details]
Proposed patch.
Comment 5 Pavel Podivilov 2010-08-17 08:07:31 PDT
(In reply to comment #3)
> (From update of attachment 63088 [details])
> LayoutTests/http/tests/inspector/inspector-test2.js:162
>  +          "if (!InspectorTest) {",
> !window.InspectorTest, otherwise you'll get an exception.
done

> LayoutTests/http/tests/inspector/inspector-test2.js:174
>  +      layoutTestController.evaluateInWebInspector(completeTestCallId, "true");
> This roundtrip shouldn't be needed(at least at the new tests).
done

> LayoutTests/http/tests/inspector/inspector-test2.js:69
>  +  function createKeyEvent(keyIdentifier)
> Let's move all these methods on to InspectorTest object so that it's easy to distinguish test methods from the rest of front-end methods.
This methods are actually private methods of InspectorTest not visible from outside. We can make them public if needed by tests.
> 
> LayoutTests/http/tests/inspector/inspector-test2.js:24
>  +  InspectorTest.push = function(text)
> maybe rename it to addResult?
done
Comment 6 Pavel Podivilov 2010-08-18 05:50:27 PDT
Created attachment 64693 [details]
Proposed patch.
Comment 7 Yury Semikhatsky 2010-08-18 06:27:52 PDT
Comment on attachment 64693 [details]
Proposed patch.

Clearing flags on attachment: 64693

Committed r65606: <http://trac.webkit.org/changeset/65606>
Comment 8 Yury Semikhatsky 2010-08-18 06:28:03 PDT
All reviewed patches have been landed.  Closing bug.