terminal: init xterm.js options before calling `open()`

This is more efficient and prevents some flashing.

Bug: b/236205389
Change-Id: I5832799ae0093854f8fef2eebd2d2fcf506aaa76
Reviewed-on: https://chromium-review.googlesource.com/c/apps/libapps/+/3868655
Reviewed-by: Joel Hockey <joelhockey@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
diff --git a/terminal/js/terminal_emulator_tests.js b/terminal/js/terminal_emulator_tests.js
index e0f41ab..1e3b764 100644
--- a/terminal/js/terminal_emulator_tests.js
+++ b/terminal/js/terminal_emulator_tests.js
@@ -35,6 +35,7 @@
         enableWebGL: true,
         testParams: /** @type {!XtermTerminalTestParams} */(testParams),
       });
+      this.terminal.inited_ = true;
     });
 
     describe('updateFont_()', function() {