blob: 2504ce3b24c931540d05429bc1ba1a45fd43bc31 [file] [log] [blame]
Tests script snippet model.
Running: testCreateEditRenameRemove
UISourceCodeAdded: Script snippet #1
Snippet content:
Snippet1 created.
UISourceCodeAdded: Script snippet #2
Snippet content:
Snippet2 created.
Renaming snippet to 'foo' ...
Snippet renamed successfully.
UISourceCode name is 'foo' now.
Number of uiSourceCodes in workspace: 2
Renaming snippet to ' ' ...
Snippet was not renamed.
UISourceCode name is 'foo' now.
Number of uiSourceCodes in workspace: 2
Renaming snippet to ' bar ' ...
Snippet renamed successfully.
UISourceCode name is 'bar' now.
Number of uiSourceCodes in workspace: 2
Renaming snippet to 'foo' ...
Snippet renamed successfully.
UISourceCode name is 'foo' now.
Number of uiSourceCodes in workspace: 2
Renaming snippet to 'bar' ...
Snippet renamed successfully.
UISourceCode name is 'bar' now.
Number of uiSourceCodes in workspace: 2
Renaming snippet to 'foo' ...
Snippet was not renamed.
UISourceCode name is 'bar' now.
Number of uiSourceCodes in workspace: 2
Content of first snippet:
Content of second snippet:
Delete snippets..
UISourceCodeRemoved: foo
UISourceCodeRemoved: bar
Number of uiSourceCodes in workspace: 0
Add third..
UISourceCodeAdded: Script snippet #3
Content of third snippet:
Number of uiSourceCodes in workspace: 1
Delete third..
UISourceCodeRemoved: Script snippet #3
Number of uiSourceCodes in workspace: 0
Running: testEvaluate
Run Snippet1..
Snippet1:1 undefined
Run Snippet2..
Snippet1:1 undefined
Snippet2:1 ƒ doesNothing() {
var i = 2+2;
}
Run Snippet1..
VM Snippet1:1 undefined
Snippet2:1 ƒ doesNothing() {
var i = 2+2;
}
Snippet1:1 undefined
Run Snippet3..
VM Snippet1:1 undefined
Snippet2:1 ƒ doesNothing() {
var i = 2+2;
}
Snippet1:1 undefined
Snippet3:1 1
Running: testEvaluateEditReload
Run Snippet1..
script-snippet-model.js:141 Console was cleared
Snippet1:1 undefined
Page reloaded.
Running: testEvaluateWithWorker
Run Snippet1..
Snippet1:1 4
Running: testDangerousNames