Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/318653

Change subject: Fix ve.test.utils.createSurfaceFromHtml
......................................................................

Fix ve.test.utils.createSurfaceFromHtml

Was passing an HTMLDocument instead of a DM document.
This wasn't failing because the UI surface constructor accepts
HTMLDocuments.

Change-Id: Ibb9a32de4d86295dddc5a677c180ea9c706a1983
---
M tests/ve.test.utils.js
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/53/318653/1

diff --git a/tests/ve.test.utils.js b/tests/ve.test.utils.js
index 4812066..0a5006c 100644
--- a/tests/ve.test.utils.js
+++ b/tests/ve.test.utils.js
@@ -243,7 +243,9 @@
         * @return {ve.ui.Surface} UI surface
         */
        ve.test.utils.createSurfaceFromHtml = function ( html ) {
-               return this.createSurfaceFromDocument( 
ve.createDocumentFromHtml( html ) );
+               return this.createSurfaceFromDocument(
+                       ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( html ) )
+               );
        };
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/318653
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb9a32de4d86295dddc5a677c180ea9c706a1983
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to