From dddb5988182a6c9c065b8895b078c209d46f0eef Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 1 Sep 2015 11:51:28 +0800 Subject: [PATCH] spec: Node integration should work after POST --- spec/fixtures/pages/post.html | 10 ++++++++++ spec/webview-spec.coffee | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 spec/fixtures/pages/post.html diff --git a/spec/fixtures/pages/post.html b/spec/fixtures/pages/post.html new file mode 100644 index 00000000..06f6f365 --- /dev/null +++ b/spec/fixtures/pages/post.html @@ -0,0 +1,10 @@ + + +
+

+
+ + + diff --git a/spec/webview-spec.coffee b/spec/webview-spec.coffee index 7c2cd1a9..6eb391ac 100644 --- a/spec/webview-spec.coffee +++ b/spec/webview-spec.coffee @@ -48,6 +48,14 @@ describe ' tag', -> webview.src = "file://#{fixtures}/pages/d.html" document.body.appendChild webview + it 'loads node symbols after POST navigation when set', (done) -> + webview.addEventListener 'console-message', (e) -> + assert.equal e.message, 'function object object' + done() + webview.setAttribute 'nodeintegration', 'on' + webview.src = "file://#{fixtures}/pages/post.html" + document.body.appendChild webview + # If the test is executed with the debug build on Windows, we will skip it # because native modules don't work with the debug build (see issue #2558). if process.platform isnt 'win32' or -- 2.43.0