UnifiedWriter Regression Tests

Target: dev-5.66.6. Open parameters.html and verify the following Model-first editing behaviours.

v5.56.0 focus: v5.47-v5.56 productization plus DOCM/VBA macro foundation: selection/IME/Undo/Clipboard diagnostics, DOCX compatibility diagnostics, layout/print/PDF preflight, Host API v1.1, i18n audit, and regression/product readiness polish.

1. Menu / Toolbar polish

CaseExpected result
Compact menu densityTop menus and nested submenus open with compact row height; Japanese labels do not create excessive right-side blank space.
Shortcut alignmentShortcut keys such as Ctrl+O, Ctrl+S, and Ctrl+P remain right aligned and never touch the label text.
Submenu arrowsSubmenu arrows are shown only when children exist and stay aligned on the right edge.
Toolbar overflowThe toolbar stays one compact row and horizontally scrolls on narrow frames instead of wrapping into a tall toolbar.
Menu nameJapanese Format menu is shown as 書式, not 表示形式.

2. Command availability / contextual toolbars

CaseExpected result
No object selectedImage-only and table-only commands are disabled or hidden as appropriate.
Select imageImage contextual toolbar appears; table contextual tools remain hidden/disabled.
Select table cell/rangeTable contextual toolbar appears; image contextual tools remain hidden/disabled.
Mixed selection stateToolbar buttons that represent mixed selection state show the mixed indicator instead of incorrect active state.
Status barStatus bar shows the current selection mode: text/table/image/comment.

3. Core editing stability

CaseExpected result
IME inputJapanese IME composition does not cause intermediate page re-rendering; confirmed text becomes one natural undo unit.
Undo / RedoText, table, image and comment operations restore both document content and selection mode.
ClipboardText, table range, and selected image copy/cut/paste routes do not conflict.
Context menuRight-click inside the document never shows the browser-native context menu; UnifiedWriter menu is shown for text/link/table/image.

4. Stage 1 practical editing

CaseExpected result
TableInsert, select, edit, merge/split, style, copy/paste, resize and normalize table grid without breaking DocumentModel.
ImageInsert image through Host OpenFile callback; select, resize, set wrap/caption/margin, and delete with Undo support.
ReviewAdd/edit/reply/resolve/reopen comments; history and footnote panels remain synchronized with metadata.
Page chromeHeader/footer/page number/footnote chrome renders from metadata and is not saved as transient DOM handles.

5. DOCX / UWPSX / Host integration

CaseExpected result
DOCX import/exportHeadings, paragraphs, inline formatting, lists, tables, images, links, comments, footnotes and header/footer basics round-trip through diagnostics-visible paths.
Preserved OOXMLUnsupported parts are represented in diagnostics/preserved metadata instead of silently discarded.
UWPSX reopenSave/reopen preserves document metadata, quality diagnostics, Host API policy and round-trip policy.
Host APIgetDocument(), setDocument(), exportBlob(), validate(), and Host callback flow remain storage-provider independent.

6. Print / PDF / Layout

CaseExpected result
PrintOnly document pages are printed, never Host/Demo chrome, menus, side panes or parameter panels.
PDFPDF export uses rendered pages and preserves Japanese text, images and simple tables as closely as current renderer allows.
LayoutPrint Layout / Normal Layout switching keeps editor selection usable and does not restore contenteditable as document truth.

v5.52.0 productization checks

7. DOCM / VBA / Script Engine

CaseExpected result
DOCM importImporting a .docm preserves vbaProject.bin in UWPSX macro metadata and imports the document body through the DOCX path.
Macro diagnosticsTools > マクロ診断 reports preserved VBA, supported document APIs and unsupported OS-level APIs.
VBA viewer開発 > VBAコードビューア displays extracted/best-effort module hints without executing macros.
VBA to JS開発 > VBA→JS変換 generates browser-safe UnifiedWriter JavaScript macro skeletons for supported document-editing statements.
Script EngineTools > UnifiedWriterスクリプトエンジン keeps execution disabled by default and blocks FileSystemObject, Shell, DLL, ActiveX, COM and Win32 APIs.
DOCM exportExport > DOCM writes a macro-enabled OOXML package and restores preserved macro parts when available.
v5.63.0 focus: v5.57-v5.63 consolidation: editing stability, Track Changes/Suggesting foundation, DOCX/DOCM round-trip preserve, DrawingML/Shape placeholder diagnostics, Layout/Print/PDF preflight, macro object model, Host/i18n/regression polish.

8. v5.65.0 Control policy / OneEditor integration

CaseExpected result
Policy wordingDocs and Control contract describe OneEditor / OneViewer File-menu delegation as a profile-specific integration, not a universal Host rule.
Workbench File menuWorkbenchControl can still show a package File menu and route items to writer.file.* commands.
EditorControl view modecreateEditorControl({ mode:"view", readOnly:true }) exposes only view-safe commands and file capabilities.
Command guardcontrol.exec("writer.format.bold") is rejected in view/readOnly mode, while writer.file.openPackage, export, print and properties remain allowed.
OneEditor demodemo/oneeditor-integration.html displays Command/Menu/Toolbar/File Capability JSON and does not rely on Workbench File menu chrome.

9. v5.66.0 UnifiedControl Framework

CaseExpected result
RequireJS peer dependencyDemo/Host config provides both UnifiedControl and UnifiedWriter aliases. UnifiedControl is not copied into the UnifiedWriter ZIP.
EditorControl classUnifiedWriter.EditorControl is exported and instances returned by createEditorControl() inherit UnifiedControl.Control.
WorkbenchControl classUnifiedWriter.WorkbenchControl is exported and instances returned by createWorkbenchControl() expose the standard Control API.
Command contributiongetCommandContributions('menu') and getCommandContributions('toolbar') return descriptors that reference command IDs and do not require Host DOM access.
View mode guardview/readOnly mode still rejects mutation commands through exec().