Bug 43264 - Web Inspector: inspector tests should be frontend-driven
Summary: Web Inspector: inspector tests should be frontend-driven
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-30 11:15 PDT by Pavel Podivilov
Modified: 2010-08-18 06:28 PDT (History)
3 users (show)

See Also:


Attachments
Proposed patch. (12.03 KB, patch)
2010-07-30 11:27 PDT, Pavel Podivilov
no flags Details | Formatted Diff | Diff
Define inspector layout test as a sequence of steps. (4.52 KB, patch)
2010-07-31 03:59 PDT, Pavel Podivilov
no flags Details | Formatted Diff | Diff
Proposed patch. (11.71 KB, patch)
2010-08-17 08:04 PDT, Pavel Podivilov
no flags Details | Formatted Diff | Diff
Proposed patch. (11.87 KB, patch)
2010-08-18 05:50 PDT, Pavel Podivilov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.