Title: [139881] trunk/LayoutTests
- Revision
- 139881
- Author
- [email protected]
- Date
- 2013-01-16 07:26:14 -0800 (Wed, 16 Jan 2013)
Log Message
Web Inspector: create helper InspectorTest method to dump editor HTML
https://bugs.webkit.org/show_bug.cgi?id=107007
Patch by Andrey Lushnikov <[email protected]> on 2013-01-16
Reviewed by Pavel Feldman.
Add helper method to dump textEditor HTML.
* inspector/editor/editor-test.js:
(initialize_EditorTests.InspectorTest.dumpEditorHTML): Added.
* inspector/editor/text-editor-highlight-regexp.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (139880 => 139881)
--- trunk/LayoutTests/ChangeLog 2013-01-16 15:20:24 UTC (rev 139880)
+++ trunk/LayoutTests/ChangeLog 2013-01-16 15:26:14 UTC (rev 139881)
@@ -1,3 +1,16 @@
+2013-01-16 Andrey Lushnikov <[email protected]>
+
+ Web Inspector: create helper InspectorTest method to dump editor HTML
+ https://bugs.webkit.org/show_bug.cgi?id=107007
+
+ Reviewed by Pavel Feldman.
+
+ Add helper method to dump textEditor HTML.
+
+ * inspector/editor/editor-test.js:
+ (initialize_EditorTests.InspectorTest.dumpEditorHTML): Added.
+ * inspector/editor/text-editor-highlight-regexp.html:
+
2013-01-16 Andrey Kosyakov <[email protected]>
Web Inspector: [Extensions API] remove inspectedWindow.onReset event
Modified: trunk/LayoutTests/inspector/editor/editor-test.js (139880 => 139881)
--- trunk/LayoutTests/inspector/editor/editor-test.js 2013-01-16 15:20:24 UTC (rev 139880)
+++ trunk/LayoutTests/inspector/editor/editor-test.js 2013-01-16 15:26:14 UTC (rev 139881)
@@ -69,6 +69,13 @@
}
};
+InspectorTest.dumpEditorHTML = function(textEditor, mainPanelOnly)
+{
+ var element = mainPanelOnly ? textEditor._mainPanel.element : textEditor.element;
+ var dumpedHTML = element.innerHTML.replace(/<div/g, "\n<div");
+ InspectorTest.addResult(dumpedHTML);
+};
+
InspectorTest.getLineElement = function(textEditor, lineNumber)
{
return textEditor._mainPanel.chunkForLine(lineNumber).expandedLineRow(lineNumber);
Modified: trunk/LayoutTests/inspector/editor/text-editor-highlight-regexp.html (139880 => 139881)
--- trunk/LayoutTests/inspector/editor/text-editor-highlight-regexp.html 2013-01-16 15:20:24 UTC (rev 139880)
+++ trunk/LayoutTests/inspector/editor/text-editor-highlight-regexp.html 2013-01-16 15:26:14 UTC (rev 139881)
@@ -20,13 +20,13 @@
var textEditor = InspectorTest.createTestEditor();
textEditor.setText(text.join("\n"));
InspectorTest.addResult("\nBefore highlight");
- InspectorTest.addResult(textEditor._mainPanel.element.innerHTML.replace(/<div/g, "\n<div"));
+ InspectorTest.dumpEditorHTML(textEditor, true);
textEditor.highlightRegex(/foo_./, "some-css-class");
InspectorTest.addResult("\nAdd highlight for regexp /foo_./");
- InspectorTest.addResult(textEditor._mainPanel.element.innerHTML.replace(/<div/g, "\n<div"));
+ InspectorTest.dumpEditorHTML(textEditor, true);
InspectorTest.addResult("\nRemove highlight for regexp /foo_./");
textEditor.removeRegexHighlight(/foo_./);
- InspectorTest.addResult(textEditor._mainPanel.element.innerHTML.replace(/<div/g, "\n<div"));
+ InspectorTest.dumpEditorHTML(textEditor, true);
next();
},
]);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes