Open the Sky
This commit is contained in:
parent
3c8baa179f
commit
b3df23f7c1
21
engine/src/flutter/BUILD.gn
Normal file
21
engine/src/flutter/BUILD.gn
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//tools/grit/grit_rule.gni")
|
||||
|
||||
group("sky") {
|
||||
testonly = true
|
||||
|
||||
deps = [
|
||||
"//mojo",
|
||||
"//sky/engine/platform:platform_unittests",
|
||||
"//sky/engine/web:sky_unittests",
|
||||
"//sky/engine/wtf:unittests",
|
||||
"//sky/framework/inspector/server",
|
||||
"//sky/tools/debugger",
|
||||
"//sky/tools/tester",
|
||||
"//sky/viewer",
|
||||
"//third_party/mesa:osmesa",
|
||||
]
|
||||
}
|
39
engine/src/flutter/HACKING.md
Normal file
39
engine/src/flutter/HACKING.md
Normal file
@ -0,0 +1,39 @@
|
||||
Hacking on Sky
|
||||
==============
|
||||
|
||||
Running applications
|
||||
--------------------
|
||||
|
||||
* ``./sky/tools/skydb --debug``
|
||||
* You should see a ``(skydb)`` prompt
|
||||
* Type ``help`` to see the list of available commands
|
||||
* The most common command is to load a URL, which youc an do simply by typing
|
||||
the URL. To reload the current page, type enter.
|
||||
|
||||
* ``./sky/tools/test_sky --debug``
|
||||
* This should run the tests
|
||||
|
||||
Running tests manually
|
||||
----------------------------
|
||||
|
||||
* ``sky/tools/run_sky_httpd``
|
||||
* ``out/Debug/mojo_shell --args-for="mojo://native_viewport_service/ --use-headless-config" --content-handlers=text/html,mojo://sky_viewer/ --url-mappings=mojo:window_manager=mojo:sky_tester mojo:window_manager``
|
||||
* The ``sky_tester`` should print ``#READY`` when ready
|
||||
* Type the URL you wish to run, for example ``http://127.0.0.1:8000/lowlevel/text.html``, and press the enter key
|
||||
* The harness should print the results of the test. You can then type another URL.
|
||||
|
||||
Writing tests
|
||||
-------------
|
||||
|
||||
* Import ``tests/http/tests/resources/mocha.html``
|
||||
* Write tests in [mocha format](http://visionmedia.github.io/mocha/#getting-started) and use [chai asserts](http://chaijs.com/api/assert/):
|
||||
```
|
||||
describe('My pretty test of my subject', function() {
|
||||
var subject = new MySubject();
|
||||
|
||||
it('should be pretty', function() {
|
||||
assert.ok(subject.isPretty);
|
||||
});
|
||||
|
||||
});
|
||||
```
|
30
engine/src/flutter/LICENSE
Normal file
30
engine/src/flutter/LICENSE
Normal file
@ -0,0 +1,30 @@
|
||||
// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
//
|
||||
// The Chromium Authors can be found at
|
||||
// http://src.chromium.org/svn/trunk/src/AUTHORS
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
engine/src/flutter/examples/README.md
Normal file
2
engine/src/flutter/examples/README.md
Normal file
@ -0,0 +1,2 @@
|
||||
These are work-in-progress examples of how the language might look.
|
||||
They won't currently work.
|
78
engine/src/flutter/examples/radio.sky
Normal file
78
engine/src/flutter/examples/radio.sky
Normal file
@ -0,0 +1,78 @@
|
||||
SKY MODULE - radio button and radio button group
|
||||
<!-- accessibility handling not implemented yet, pending mojo service -->
|
||||
<import src="sky:core" as="sky"/>
|
||||
|
||||
<!-- <radio> -->
|
||||
<template id="radio-shadow">
|
||||
<style>
|
||||
:host { width: 1em; height: 1em; border: solid; background: white; }
|
||||
:host[checked] { background: black; }
|
||||
</style>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {};
|
||||
module.exports.RadioElement = sky.registerElement('radio', class extends Element {
|
||||
constructor () {
|
||||
this.addEventListener('click', (event) => this.checked = true);
|
||||
this.createShadowTree().appendChild(module.document.findId('radio-shadow').cloneNode(true));
|
||||
}
|
||||
get checked () {
|
||||
return this.hasAttribute('checked');
|
||||
}
|
||||
set checked (value) {
|
||||
if (value)
|
||||
this.setAttribute('checked', '');
|
||||
else
|
||||
this.removeAttribute('checked');
|
||||
}
|
||||
get value () {
|
||||
return this.getAttribute('name');
|
||||
}
|
||||
set value (value) {
|
||||
this.setAttribute('value', value);
|
||||
}
|
||||
attributeChanged(name, oldValue, newValue) {
|
||||
if ((name == 'checked') && (newValue != null))
|
||||
if (this.parentNode instanceof module.exports.RadioGroupElement)
|
||||
this.parentNode.setChecked(this);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- <radiogroup> -->
|
||||
<template id="radiogroup-shadow">
|
||||
<style>
|
||||
:host { padding: 1em; border: thin solid; }
|
||||
</style>
|
||||
</template>
|
||||
<script>
|
||||
module.exports.RadioGroupElement = sky.registerElement('radiogroup', class extends Element {
|
||||
constructor () {
|
||||
this.createShadowTree().appendChild(module.document.findId('radiogroup-shadow').cloneNode(true));
|
||||
}
|
||||
get value () {
|
||||
let children = this.getChildNodes();
|
||||
for (let child of children)
|
||||
if (child instanceof module.exports.RadioElement)
|
||||
if (child.checked)
|
||||
return child.name;
|
||||
return '';
|
||||
}
|
||||
set value (name) {
|
||||
let children = this.getChildNodes();
|
||||
for (let child of children)
|
||||
if (child instanceof module.exports.RadioElement)
|
||||
if (child.value == name)
|
||||
child.checked = true;
|
||||
}
|
||||
setChecked(radio) {
|
||||
if (!((radio instanceof module.exports.Radio) && radio.parentNode == this))
|
||||
throw;
|
||||
let children = this.getChildNodes();
|
||||
for (let child of children)
|
||||
if (child instanceof module.exports.RadioElement)
|
||||
if (child != radio)
|
||||
child.checked = false;
|
||||
}
|
||||
});
|
||||
</script>
|
9
engine/src/flutter/tests/TestExpectations
Normal file
9
engine/src/flutter/tests/TestExpectations
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
# These tests rely upon eventSender, which isn't implemented yet.
|
||||
crbug.com/1 editing/ [ Skip ]
|
||||
|
||||
# These tests require gc() to be exposed.
|
||||
crbug.com/1 mutation-observer/observer-wrapper-dropoff-transient.html [ Skip ]
|
||||
crbug.com/1 mutation-observer/observer-wrapper-dropoff.html [ Skip ]
|
||||
crbug.com/1 mutation-observer/transient-gc-crash.html [ Skip ]
|
||||
crbug.com/1 mutation-observer/weak-callback-gc-crash.html [ Skip ]
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 Custom element constructors should run the createdCallback synchronously
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
@ -0,0 +1,21 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<body>
|
||||
<div id="container"></div>
|
||||
<script>
|
||||
describe('Custom element constructors', function() {
|
||||
it('should run the createdCallback synchronously', function() {
|
||||
var proto = Object.create(HTMLElement.prototype);
|
||||
var ncallbacks = 0;
|
||||
proto.createdCallback = function () {
|
||||
ncallbacks++;
|
||||
};
|
||||
var A = document.registerElement('x-a', {prototype: proto});
|
||||
var x = new A();
|
||||
assert.equal(ncallbacks, 1);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 document.registerElement() should have basic behaviors
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
@ -0,0 +1,101 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<body>
|
||||
<div id="container"></div>
|
||||
<script>
|
||||
describe('document.registerElement()', function() {
|
||||
it('should have basic behaviors', function() {
|
||||
function createRegisterParameters()
|
||||
{
|
||||
return {
|
||||
prototype: Object.create(HTMLElement.prototype, { thisIsPrototype: { value: true } })
|
||||
};
|
||||
}
|
||||
|
||||
var fooConstructor = document.registerElement('x-foo', createRegisterParameters());
|
||||
assert.equal(typeof fooConstructor, "function");
|
||||
assert.equal(fooConstructor.prototype.__proto__, HTMLElement.prototype);
|
||||
assert.ok(fooConstructor.prototype.thisIsPrototype);
|
||||
|
||||
// Bad prototype: prototype is already a built-in interface prototype object
|
||||
assert.throws(function() {
|
||||
document.registerElement("x-bad-a", HTMLElement)
|
||||
});
|
||||
// Bad prototype: prototype is already a Custom Element interface prototype object
|
||||
assert.throws(function() {
|
||||
document.registerElement("x-bad-b", fooConstructor)
|
||||
});
|
||||
// Bad prototype: 'constructor' is not configurable
|
||||
var proto = Object.create(HTMLElement.prototype, {
|
||||
constructor: {configurable: false, writable: true}
|
||||
});
|
||||
assert.throws(function() {
|
||||
document.registerElement("x-bad-c", { prototype: proto })
|
||||
});
|
||||
// Call as function
|
||||
assert.throws(function() {
|
||||
fooConstructor()
|
||||
})
|
||||
|
||||
// Constructor initiated instantiation
|
||||
var createdFoo = new fooConstructor();
|
||||
|
||||
// JS built-in properties
|
||||
assert.equal(createdFoo.__proto__, fooConstructor.prototype);
|
||||
assert.equal(createdFoo.constructor, fooConstructor);
|
||||
|
||||
// Native getter
|
||||
assert.equal(createdFoo.tagName, "x-foo");
|
||||
|
||||
// Native setter
|
||||
createdFoo.textContent = 'Hello';
|
||||
assert.equal(createdFoo.textContent, "Hello");
|
||||
|
||||
// Native method
|
||||
var childDiv = document.createElement('div');
|
||||
createdFoo.appendChild(childDiv);
|
||||
assert.equal(createdFoo.lastChild, childDiv);
|
||||
|
||||
// Parser initiated instantiation
|
||||
var container = document.getElementById('container');
|
||||
container.appendChild(document.createElement("x-foo"));
|
||||
var parsedFoo = container.firstChild;
|
||||
|
||||
assert.equal(parsedFoo.__proto__, fooConstructor.prototype);
|
||||
assert.equal(parsedFoo.tagName, "x-foo");
|
||||
|
||||
// Ensuring the wrapper is retained
|
||||
parsedFoo.someProperty = 'hello';
|
||||
assert.equal(parsedFoo.someProperty, container.firstChild.someProperty);
|
||||
|
||||
// Having another constructor
|
||||
var barConstructor = document.registerElement('x-bar', createRegisterParameters());
|
||||
assert.ok('barConstructor !== fooConstructor');
|
||||
var createdBar = new barConstructor();
|
||||
assert.equal(createdBar.tagName, "x-bar");
|
||||
|
||||
// Having a subclass
|
||||
var bazConstructor = document.registerElement('x-baz', { prototype: Object.create(fooConstructor.prototype, { thisIsAlsoPrototype: { value: true } }) });
|
||||
var createdBaz = new bazConstructor();
|
||||
assert.equal(createdBaz.tagName, "x-baz");
|
||||
assert.ok(createdBaz.thisIsPrototype);
|
||||
assert.ok(createdBaz.thisIsAlsoPrototype);
|
||||
|
||||
// With irregular cases
|
||||
var createdUpperBar = document.createElement('X-BAR');
|
||||
var createdMixedBar = document.createElement('X-Bar');
|
||||
assert.notEqual(createdUpperBar.constructor, barConstructor);
|
||||
assert.notEqual(createdUpperBar.tagName, "x-bar");
|
||||
assert.notEqual(createdMixedBar.constructor, barConstructor);
|
||||
assert.notEqual(createdMixedBar.tagName, "x-bar");
|
||||
|
||||
// Constructors shouldn't interfere with each other
|
||||
assert.equal((new fooConstructor).tagName, "x-foo");
|
||||
assert.equal((new barConstructor).tagName, "x-bar");
|
||||
assert.equal((new bazConstructor).tagName, "x-baz");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,2 @@
|
||||
CONSOLE: LOG: Constructor object isn't created.
|
||||
Fuzzing document.registerElement() through getters. PASS unless crash.
|
@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/dump-as-text.html" />
|
||||
<link rel="import" href="resources/document-register-fuzz.html" as="fuzzer" />
|
||||
<body>
|
||||
<div id="container"></div>
|
||||
Fuzzing document.registerElement() through getters. PASS unless crash.
|
||||
<script>
|
||||
fuzzer.setupObjectHooks({
|
||||
prototypeGet: function() { },
|
||||
prototypeSet: function(value) { },
|
||||
constructorGet: function() { },
|
||||
constructorSet: function(value) { }
|
||||
});
|
||||
|
||||
fuzzer.exerciseDocumentRegister();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1 @@
|
||||
Fuzzing document.registerElement() through getters. PASS uless crash.
|
@ -0,0 +1,21 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/dump-as-text.html" />
|
||||
<link rel="import" href="resources/document-register-fuzz.html" as="fuzzer" />
|
||||
<body>
|
||||
<div id="container"></div>
|
||||
Fuzzing document.registerElement() through getters. PASS uless crash.
|
||||
<script>
|
||||
var badPrototype = Image.prototype;
|
||||
var badConstructor = Image.prototype.constructor;
|
||||
|
||||
fuzzer.setupObjectHooks({
|
||||
prototypeGet: function() { return badPrototype; },
|
||||
prototypeSet: function(value) { },
|
||||
constructorGet: function() { return badConstructor; },
|
||||
constructorSet: function(value) { }
|
||||
});
|
||||
|
||||
fuzzer.exerciseDocumentRegister();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,2 @@
|
||||
CONSOLE: LOG: Constructor object isn't created.
|
||||
Fuzzing document.registerElement() through getters. PASS unless crash.
|
@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/dump-as-text.html" />
|
||||
<link rel="import" href="resources/document-register-fuzz.html" as="fuzzer" />
|
||||
<body>
|
||||
<div id="container"></div>
|
||||
Fuzzing document.registerElement() through getters. PASS unless crash.
|
||||
<script>
|
||||
fuzzer.setupObjectHooks({
|
||||
prototypeGet: function() { throw "Error"; },
|
||||
prototypeSet: function(value) { throw "Error"; },
|
||||
constructorGet: function() { throw "Error"; },
|
||||
constructorSet: function(value) { throw "Error"; }
|
||||
});
|
||||
|
||||
fuzzer.exerciseDocumentRegister();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,2 @@
|
||||
Tests unresolved element not leaking if never resolved.
|
||||
|
@ -0,0 +1,13 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/dump-as-text.html" />
|
||||
<body>
|
||||
Tests unresolved element not leaking if never resolved.
|
||||
<div id="container"></div>
|
||||
<script>
|
||||
// Verify that a custom tag for which no element is ever registered
|
||||
// doesn't cause a document nor elements to leak.
|
||||
var host = document.createElement('div');
|
||||
host.appendChild(document.createElement('x-a'));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1 @@
|
||||
Tests that type extension of a element whose DOM interface is HTMLElement does not assert
|
@ -0,0 +1,11 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/dump-as-text.html" />
|
||||
<body>
|
||||
<section id="a" is="x-a"></section>
|
||||
Tests that type extension of a element whose DOM interface is HTMLElement does not assert
|
||||
<script>
|
||||
var u = document.querySelector('#a');
|
||||
var v = document.createElement('section', 'x-a');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,2 @@
|
||||
CONSOLE: LOG: PASS unless crash
|
||||
|
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/dump-as-text.html" />
|
||||
<body>
|
||||
<script>
|
||||
document.registerElement("x-foo", { prototype: Object.create(HTMLElement.prototype, { createdCallback: { value: function () { this.innerHTML = "<x-foo>Hello</x-foo>"; } } }) });
|
||||
document.createElement("x-foo");
|
||||
console.log("PASS unless crash");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1 @@
|
||||
This test ensures that is visible in following script block.
|
@ -0,0 +1,29 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/dump-as-text.html" />
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<body>
|
||||
This test ensures that is visible in following script block.
|
||||
<script>
|
||||
window.callbacksCalled = [];
|
||||
|
||||
function fooCreatedFunction() {
|
||||
assert.deepEqual(window.callbacksCalled, []);
|
||||
window.callbacksCalled.push(this.tagName);
|
||||
this.appendChild(document.createElement("x-bar"));
|
||||
assert.deepEqual(window.callbacksCalled, ['x-foo', 'x-bar']);
|
||||
}
|
||||
|
||||
function barCreatedFunction() {
|
||||
assert.deepEqual(window.callbacksCalled, ['x-foo']);
|
||||
window.callbacksCalled.push(this.tagName);
|
||||
}
|
||||
|
||||
document.registerElement("x-foo", { prototype: Object.create(HTMLElement.prototype, { createdCallback: { value: fooCreatedFunction } }) });
|
||||
document.registerElement("x-bar", { prototype: Object.create(HTMLElement.prototype, { createdCallback: { value: barCreatedFunction } }) });
|
||||
</script>
|
||||
<script>
|
||||
document.createElement("x-foo");
|
||||
assert.deepEqual(window.callbacksCalled, ['x-foo', 'x-bar']);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,2 @@
|
||||
This test ensures that the lifecycle callback of a parser-made element is visible in following script block.
|
||||
|
@ -0,0 +1,15 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/dump-as-text.html" />
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<body>
|
||||
This test ensures that the lifecycle callback of a parser-made element is visible in following script block.
|
||||
<script>
|
||||
var proto = Object.create(HTMLElement.prototype, { createdCallback: { value: function() { window.callbacksCalled = true; } } });
|
||||
document.registerElement("x-foo", { prototype: proto });
|
||||
</script>
|
||||
<x-foo></x-foo>
|
||||
<script>
|
||||
assert.ok("window.callbacksCalled");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,60 @@
|
||||
<script>
|
||||
function setupObjectHooks(hooks)
|
||||
{
|
||||
// Wrapper for these object should be materialized before setting hooks.
|
||||
console.log;
|
||||
document.register;
|
||||
|
||||
Object.defineProperty(Object.prototype, "prototype", {
|
||||
get: function() { return hooks.prototypeGet(); },
|
||||
set: function(value) { return hooks.prototypeSet(value); }
|
||||
});
|
||||
|
||||
Object.defineProperty(Object.prototype, "constructor", {
|
||||
get: function() { return hooks.constructorGet(); },
|
||||
set: function(value) { return hooks.constructorSet(value); }
|
||||
});
|
||||
|
||||
return hooks;
|
||||
}
|
||||
|
||||
function exerciseDocumentRegister()
|
||||
{
|
||||
register('x-a', {});
|
||||
register('x-b', {prototype: Object.create(HTMLElement.prototype)});
|
||||
}
|
||||
|
||||
function register(name, options)
|
||||
{
|
||||
var myConstructor = null;
|
||||
try {
|
||||
myConstructor = document.registerElement(name, options);
|
||||
} catch (e) { }
|
||||
|
||||
try {
|
||||
if (!myConstructor) {
|
||||
console.log("Constructor object isn't created.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (myConstructor.prototype != options.prototype) {
|
||||
console.log("FAIL: bad prototype");
|
||||
return;
|
||||
}
|
||||
|
||||
var element = new myConstructor();
|
||||
if (!element)
|
||||
return;
|
||||
if (element.constructor != myConstructor) {
|
||||
console.log("FAIL: bad constructor");
|
||||
return;
|
||||
}
|
||||
} catch (e) { console.log(e); }
|
||||
}
|
||||
|
||||
this.exports = {
|
||||
setupObjectHooks: setupObjectHooks,
|
||||
exerciseDocumentRegister: exerciseDocumentRegister,
|
||||
register: register,
|
||||
}
|
||||
</script>
|
1
engine/src/flutter/tests/editing/backspace-expected.txt
Normal file
1
engine/src/flutter/tests/editing/backspace-expected.txt
Normal file
@ -0,0 +1 @@
|
||||
a
|
20
engine/src/flutter/tests/editing/backspace.html
Normal file
20
engine/src/flutter/tests/editing/backspace.html
Normal file
@ -0,0 +1,20 @@
|
||||
<body>
|
||||
<style>
|
||||
.editable {
|
||||
-webkit-user-modify: read-write-plaintext-only;
|
||||
border: 2px solid blue;
|
||||
}
|
||||
</style>
|
||||
<div class="editable"></div>
|
||||
<script>
|
||||
if (window.eventSender) {
|
||||
var control = document.querySelector('.editable');
|
||||
control.focus();
|
||||
eventSender.keyDown('a');
|
||||
eventSender.keyDown('b');
|
||||
eventSender.keyDown('backspace');
|
||||
}
|
||||
if (window.testRunner)
|
||||
testRunner.dumpAsText();
|
||||
</script>
|
||||
</body>
|
1
engine/src/flutter/tests/editing/replace-expected.txt
Normal file
1
engine/src/flutter/tests/editing/replace-expected.txt
Normal file
@ -0,0 +1 @@
|
||||
abx
|
26
engine/src/flutter/tests/editing/replace.html
Normal file
26
engine/src/flutter/tests/editing/replace.html
Normal file
@ -0,0 +1,26 @@
|
||||
<body>
|
||||
<style>
|
||||
.editable {
|
||||
-webkit-user-modify: read-write-plaintext-only;
|
||||
border: 2px solid blue;
|
||||
}
|
||||
</style>
|
||||
<div class="editable"></div>
|
||||
<script>
|
||||
if (window.eventSender) {
|
||||
var control = document.querySelector('.editable');
|
||||
control.focus();
|
||||
eventSender.keyDown('a');
|
||||
eventSender.keyDown('b');
|
||||
eventSender.keyDown('c');
|
||||
eventSender.keyDown('d');
|
||||
eventSender.keyDown('e');
|
||||
eventSender.keyDown('leftArrow', 'rangeSelectionKey');
|
||||
eventSender.keyDown('leftArrow', 'rangeSelectionKey');
|
||||
eventSender.keyDown('leftArrow', 'rangeSelectionKey');
|
||||
eventSender.keyDown('x');
|
||||
}
|
||||
if (window.testRunner)
|
||||
testRunner.dumpAsText();
|
||||
</script>
|
||||
</body>
|
1
engine/src/flutter/tests/editing/selection-expected.txt
Normal file
1
engine/src/flutter/tests/editing/selection-expected.txt
Normal file
@ -0,0 +1 @@
|
||||
ab
|
26
engine/src/flutter/tests/editing/selection.html
Normal file
26
engine/src/flutter/tests/editing/selection.html
Normal file
@ -0,0 +1,26 @@
|
||||
<body>
|
||||
<style>
|
||||
.editable {
|
||||
-webkit-user-modify: read-write-plaintext-only;
|
||||
border: 2px solid blue;
|
||||
}
|
||||
</style>
|
||||
<div class="editable"></div>
|
||||
<script>
|
||||
if (window.eventSender) {
|
||||
var control = document.querySelector('.editable');
|
||||
control.focus();
|
||||
eventSender.keyDown('a');
|
||||
eventSender.keyDown('b');
|
||||
eventSender.keyDown('c');
|
||||
eventSender.keyDown('d');
|
||||
eventSender.keyDown('e');
|
||||
eventSender.keyDown('leftArrow', 'rangeSelectionKey');
|
||||
eventSender.keyDown('leftArrow', 'rangeSelectionKey');
|
||||
eventSender.keyDown('leftArrow', 'rangeSelectionKey');
|
||||
eventSender.keyDown('backspace');
|
||||
}
|
||||
if (window.testRunner)
|
||||
testRunner.dumpAsText();
|
||||
</script>
|
||||
</body>
|
1
engine/src/flutter/tests/editing/typing-expected.txt
Normal file
1
engine/src/flutter/tests/editing/typing-expected.txt
Normal file
@ -0,0 +1 @@
|
||||
ab
|
19
engine/src/flutter/tests/editing/typing.html
Normal file
19
engine/src/flutter/tests/editing/typing.html
Normal file
@ -0,0 +1,19 @@
|
||||
<body>
|
||||
<style>
|
||||
.editable {
|
||||
-webkit-user-modify: read-write-plaintext-only;
|
||||
border: 2px solid blue;
|
||||
}
|
||||
</style>
|
||||
<div class="editable"></div>
|
||||
<script>
|
||||
if (window.eventSender) {
|
||||
var control = document.querySelector('.editable');
|
||||
control.focus();
|
||||
eventSender.keyDown('a');
|
||||
eventSender.keyDown('b');
|
||||
}
|
||||
if (window.testRunner)
|
||||
testRunner.dumpAsText();
|
||||
</script>
|
||||
</body>
|
163
engine/src/flutter/tests/http/conf/debian-httpd-2.2.conf
Normal file
163
engine/src/flutter/tests/http/conf/debian-httpd-2.2.conf
Normal file
@ -0,0 +1,163 @@
|
||||
ServerRoot "/usr"
|
||||
|
||||
LockFile "/tmp/WebKit/httpd.lock"
|
||||
PidFile "/tmp/WebKit/httpd.pid"
|
||||
ScoreBoardFile "/tmp/WebKit/httpd.scoreboard"
|
||||
|
||||
Timeout 300
|
||||
KeepAlive On
|
||||
MaxKeepAliveRequests 100
|
||||
KeepAliveTimeout 15
|
||||
|
||||
MinSpareServers 1
|
||||
MaxSpareServers 5
|
||||
StartServers 1
|
||||
MaxClients 150
|
||||
MaxRequestsPerChild 100000
|
||||
|
||||
LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
|
||||
LoadModule negotiation_module /usr/lib/apache2/modules/mod_negotiation.so
|
||||
LoadModule include_module /usr/lib/apache2/modules/mod_include.so
|
||||
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
|
||||
LoadModule asis_module /usr/lib/apache2/modules/mod_asis.so
|
||||
LoadModule imagemap_module /usr/lib/apache2/modules/mod_imagemap.so
|
||||
LoadModule actions_module /usr/lib/apache2/modules/mod_actions.so
|
||||
LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so
|
||||
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
|
||||
LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so
|
||||
LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
|
||||
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
|
||||
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
|
||||
LoadModule autoindex_module /usr/lib/apache2/modules/mod_autoindex.so
|
||||
|
||||
ServerName 127.0.0.1
|
||||
|
||||
<Directory />
|
||||
Options Indexes FollowSymLinks MultiViews ExecCGI Includes
|
||||
AllowOverride All
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
AccessFileName .htaccess
|
||||
|
||||
<Files ~ "^\.([Hh][Tt]|[Dd][Ss]_[Ss])">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy All
|
||||
</Files>
|
||||
|
||||
UseCanonicalName On
|
||||
DefaultType text/plain
|
||||
HostnameLookups Off
|
||||
|
||||
LogLevel warn
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
LogFormat "%{Referer}i -> %U" referer
|
||||
LogFormat "%{User-agent}i" agent
|
||||
|
||||
ServerSignature On
|
||||
|
||||
<IfModule mod_alias.c>
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
Header unset ETag
|
||||
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
|
||||
Header set Pragma "no-cache"
|
||||
Header set Expires "Wed, 13 Jul 1972 03:00:00 GMT"
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_mime.c>
|
||||
AddLanguage da .dk
|
||||
AddLanguage nl .nl
|
||||
AddLanguage en .en
|
||||
AddLanguage et .ee
|
||||
AddLanguage fr .fr
|
||||
AddLanguage de .de
|
||||
AddLanguage el .el
|
||||
AddLanguage he .he
|
||||
AddCharset ISO-8859-8 .iso8859-8
|
||||
AddLanguage it .it
|
||||
AddLanguage ja .ja
|
||||
AddCharset ISO-2022-JP .jis
|
||||
AddLanguage kr .kr
|
||||
AddCharset ISO-2022-KR .iso-kr
|
||||
AddLanguage nn .nn
|
||||
AddLanguage no .no
|
||||
AddLanguage pl .po
|
||||
AddCharset ISO-8859-2 .iso-pl
|
||||
AddLanguage pt .pt
|
||||
AddLanguage pt-br .pt-br
|
||||
AddLanguage ltz .lu
|
||||
AddLanguage ca .ca
|
||||
AddLanguage es .es
|
||||
AddLanguage sv .sv
|
||||
AddLanguage cs .cz .cs
|
||||
AddLanguage ru .ru
|
||||
AddLanguage zh-TW .zh-tw
|
||||
AddCharset Big5 .Big5 .big5
|
||||
AddCharset WINDOWS-1251 .cp-1251
|
||||
AddCharset CP866 .cp866
|
||||
AddCharset ISO-8859-5 .iso-ru
|
||||
AddCharset KOI8-R .koi8-r
|
||||
AddCharset UCS-2 .ucs2
|
||||
AddCharset UCS-4 .ucs4
|
||||
AddCharset UTF-8 .utf8
|
||||
|
||||
<IfModule mod_negotiation.c>
|
||||
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
|
||||
</IfModule>
|
||||
|
||||
AddType application/x-tar .tgz
|
||||
|
||||
AddEncoding x-compress .Z
|
||||
AddEncoding x-gzip .gz .tgz
|
||||
|
||||
AddHandler cgi-script .cgi .pl
|
||||
|
||||
AddType text/html .shtml
|
||||
AddHandler server-parsed .shtml
|
||||
|
||||
AddHandler send-as-is asis
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_php5.c>
|
||||
AddType application/x-httpd-php .php
|
||||
AddType application/x-httpd-php .bat
|
||||
AddType application/x-httpd-php-source .phps
|
||||
|
||||
<IfModule mod_dir.c>
|
||||
DirectoryIndex index.html index.php
|
||||
</IfModule>
|
||||
|
||||
php_flag log_errors on
|
||||
php_flag short_open_tag on
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_METHOD} ^TRACE
|
||||
RewriteRule .* - [F]
|
||||
</IfModule>
|
||||
|
||||
<VirtualHost *:8443>
|
||||
ServerName 127.0.0.1
|
||||
SSLEngine On
|
||||
</VirtualHost>
|
||||
|
||||
#
|
||||
# Apple-specific filesystem protection.
|
||||
#
|
||||
<Files "rsrc">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy All
|
||||
</Files>
|
||||
|
||||
<Directory ~ ".*\.\.namedfork">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy All
|
||||
</Directory>
|
148
engine/src/flutter/tests/http/conf/debian-httpd-2.4.conf
Normal file
148
engine/src/flutter/tests/http/conf/debian-httpd-2.4.conf
Normal file
@ -0,0 +1,148 @@
|
||||
ServerTokens OS
|
||||
ServerRoot "/usr/lib/apache2"
|
||||
|
||||
PidFile "/tmp/WebKit/httpd.pid"
|
||||
ScoreBoardFile "/tmp/WebKit/httpd.scoreboard"
|
||||
|
||||
Timeout 300
|
||||
KeepAlive On
|
||||
MaxKeepAliveRequests 100
|
||||
KeepAliveTimeout 15
|
||||
|
||||
MinSpareServers 1
|
||||
MaxSpareServers 5
|
||||
StartServers 1
|
||||
MaxClients 150
|
||||
MaxRequestsPerChild 100000
|
||||
|
||||
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
|
||||
LoadModule authz_core_module modules/mod_authz_core.so
|
||||
LoadModule authz_host_module modules/mod_authz_host.so
|
||||
LoadModule include_module modules/mod_include.so
|
||||
LoadModule headers_module modules/mod_headers.so
|
||||
LoadModule mime_module modules/mod_mime.so
|
||||
LoadModule negotiation_module modules/mod_negotiation.so
|
||||
LoadModule actions_module modules/mod_actions.so
|
||||
LoadModule alias_module modules/mod_alias.so
|
||||
LoadModule rewrite_module modules/mod_rewrite.so
|
||||
LoadModule cgi_module modules/mod_cgi.so
|
||||
LoadModule ssl_module modules/mod_ssl.so
|
||||
LoadModule php5_module modules/libphp5.so
|
||||
LoadModule asis_module modules/mod_asis.so
|
||||
|
||||
ServerName 127.0.0.1
|
||||
|
||||
<Directory />
|
||||
Options Indexes FollowSymLinks MultiViews ExecCGI Includes
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
AccessFileName .htaccess
|
||||
|
||||
<Files ~ "^\.([Hh][Tt]|[Dd][Ss]_[Ss])">
|
||||
Require all denied
|
||||
</Files>
|
||||
|
||||
UseCanonicalName On
|
||||
HostnameLookups Off
|
||||
|
||||
TypesConfig /etc/mime.types
|
||||
|
||||
LogLevel warn
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
LogFormat "%{Referer}i -> %U" referer
|
||||
LogFormat "%{User-agent}i" agent
|
||||
ErrorLog /tmp/WebKit/error_log
|
||||
|
||||
ServerSignature On
|
||||
|
||||
AddLanguage ca .ca
|
||||
AddLanguage cs .cz .cs
|
||||
AddLanguage da .dk
|
||||
AddLanguage de .de
|
||||
AddLanguage el .el
|
||||
AddLanguage en .en
|
||||
AddLanguage eo .eo
|
||||
AddLanguage es .es
|
||||
AddLanguage et .et
|
||||
AddLanguage fr .fr
|
||||
AddLanguage he .he
|
||||
AddLanguage hr .hr
|
||||
AddLanguage it .it
|
||||
AddLanguage ja .ja
|
||||
AddLanguage ko .ko
|
||||
AddLanguage ltz .ltz
|
||||
AddLanguage nl .nl
|
||||
AddLanguage nn .nn
|
||||
AddLanguage no .no
|
||||
AddLanguage pl .po
|
||||
AddLanguage pt .pt
|
||||
AddLanguage pt-BR .pt-br
|
||||
AddLanguage ru .ru
|
||||
AddLanguage sv .sv
|
||||
AddLanguage zh-CN .zh-cn
|
||||
AddLanguage zh-TW .zh-tw
|
||||
AddCharset Big5 .Big5 .big5
|
||||
AddCharset WINDOWS-1251 .cp-1251
|
||||
AddCharset CP866 .cp866
|
||||
AddCharset ISO-8859-5 .iso-ru
|
||||
AddCharset KOI8-R .koi8-r
|
||||
AddCharset UCS-2 .ucs2
|
||||
AddCharset UCS-4 .ucs4
|
||||
AddCharset UTF-8 .utf8
|
||||
|
||||
<IfModule mod_negotiation.c>
|
||||
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
|
||||
</IfModule>
|
||||
|
||||
AddType application/x-tar .tgz
|
||||
|
||||
AddEncoding x-compress .Z
|
||||
AddEncoding x-gzip .gz .tgz
|
||||
|
||||
AddType application/x-x509-ca-cert .crt
|
||||
AddType application/x-pkcs7-crl .crl
|
||||
|
||||
AddHandler cgi-script .cgi .pl
|
||||
|
||||
AddType text/html .shtml
|
||||
AddOutputFilter INCLUDES .shtml
|
||||
|
||||
AddHandler send-as-is asis
|
||||
|
||||
<IfModule mod_php5.c>
|
||||
AddType application/x-httpd-php .php
|
||||
AddType application/x-httpd-php .bat
|
||||
AddType application/x-httpd-php-source .phps
|
||||
|
||||
<IfModule mod_dir.c>
|
||||
DirectoryIndex index.html index.php
|
||||
</IfModule>
|
||||
|
||||
php_flag log_errors on
|
||||
php_flag short_open_tag on
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_METHOD} ^TRACE
|
||||
RewriteRule .* - [F]
|
||||
</IfModule>
|
||||
|
||||
<VirtualHost *:8443>
|
||||
ServerName 127.0.0.1
|
||||
SSLEngine On
|
||||
</VirtualHost>
|
||||
|
||||
#
|
||||
# Apple-specific filesystem protection.
|
||||
#
|
||||
<Files "rsrc">
|
||||
Require all denied
|
||||
</Files>
|
||||
|
||||
<Directory ~ ".*\.\.namedfork">
|
||||
Require all denied
|
||||
</Directory>
|
601
engine/src/flutter/tests/http/conf/mime.types
Normal file
601
engine/src/flutter/tests/http/conf/mime.types
Normal file
@ -0,0 +1,601 @@
|
||||
# This is a comment. I love comments.
|
||||
|
||||
# This file controls what Internet media types are sent to the client for
|
||||
# given file extension(s). Sending the correct media type to the client
|
||||
# is important so they know how to handle the content of the file.
|
||||
# Extra types can either be added here or by using an AddType directive
|
||||
# in your config files. For more information about Internet media types,
|
||||
# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type
|
||||
# registry is at <http://www.iana.org/assignments/media-types/>.
|
||||
|
||||
# MIME type Extensions
|
||||
application/activemessage
|
||||
application/andrew-inset ez
|
||||
application/applefile
|
||||
application/atom+xml atom
|
||||
application/atomicmail
|
||||
application/batch-smtp
|
||||
application/beep+xml
|
||||
application/cals-1840
|
||||
application/cnrp+xml
|
||||
application/commonground
|
||||
application/cpl+xml
|
||||
application/cybercash
|
||||
application/dca-rft
|
||||
application/dec-dx
|
||||
application/dvcs
|
||||
application/edi-consent
|
||||
application/edifact
|
||||
application/edi-x12
|
||||
application/eshop
|
||||
application/font-tdpfr
|
||||
application/http
|
||||
application/hyperstudio
|
||||
application/iges
|
||||
application/index
|
||||
application/index.cmd
|
||||
application/index.obj
|
||||
application/index.response
|
||||
application/index.vnd
|
||||
application/iotp
|
||||
application/ipp
|
||||
application/isup
|
||||
application/mac-binhex40 hqx
|
||||
application/mac-compactpro cpt
|
||||
application/macwriteii
|
||||
application/marc
|
||||
application/mathematica
|
||||
application/mathml+xml mathml
|
||||
application/msword doc
|
||||
application/news-message-id
|
||||
application/news-transmission
|
||||
application/ocsp-request
|
||||
application/ocsp-response
|
||||
application/octet-stream bin dms lha lzh exe class so dll dmg
|
||||
application/oda oda
|
||||
application/ogg ogg
|
||||
application/parityfec
|
||||
application/pdf pdf
|
||||
application/pgp-encrypted
|
||||
application/pgp-keys
|
||||
application/pgp-signature
|
||||
application/pkcs10
|
||||
application/pkcs7-mime
|
||||
application/pkcs7-signature
|
||||
application/pkix-cert
|
||||
application/pkix-crl
|
||||
application/pkixcmp
|
||||
application/postscript ai eps ps
|
||||
application/prs.alvestrand.titrax-sheet
|
||||
application/prs.cww
|
||||
application/prs.nprend
|
||||
application/prs.plucker
|
||||
application/qsig
|
||||
application/rdf+xml rdf
|
||||
application/reginfo+xml
|
||||
application/remote-printing
|
||||
application/riscos
|
||||
application/rtf
|
||||
application/sdp
|
||||
application/set-payment
|
||||
application/set-payment-initiation
|
||||
application/set-registration
|
||||
application/set-registration-initiation
|
||||
application/sgml
|
||||
application/sgml-open-catalog
|
||||
application/sieve
|
||||
application/slate
|
||||
application/smil smi smil
|
||||
application/srgs gram
|
||||
application/srgs+xml grxml
|
||||
application/timestamp-query
|
||||
application/timestamp-reply
|
||||
application/tve-trigger
|
||||
application/vemmi
|
||||
application/vnd.3gpp.pic-bw-large
|
||||
application/vnd.3gpp.pic-bw-small
|
||||
application/vnd.3gpp.pic-bw-var
|
||||
application/vnd.3gpp.sms
|
||||
application/vnd.3m.post-it-notes
|
||||
application/vnd.accpac.simply.aso
|
||||
application/vnd.accpac.simply.imp
|
||||
application/vnd.acucobol
|
||||
application/vnd.acucorp
|
||||
application/vnd.adobe.xfdf
|
||||
application/vnd.aether.imp
|
||||
application/vnd.amiga.ami
|
||||
application/vnd.anser-web-certificate-issue-initiation
|
||||
application/vnd.anser-web-funds-transfer-initiation
|
||||
application/vnd.audiograph
|
||||
application/vnd.blueice.multipass
|
||||
application/vnd.bmi
|
||||
application/vnd.businessobjects
|
||||
application/vnd.canon-cpdl
|
||||
application/vnd.canon-lips
|
||||
application/vnd.cinderella
|
||||
application/vnd.claymore
|
||||
application/vnd.commerce-battelle
|
||||
application/vnd.commonspace
|
||||
application/vnd.contact.cmsg
|
||||
application/vnd.cosmocaller
|
||||
application/vnd.criticaltools.wbs+xml
|
||||
application/vnd.ctc-posml
|
||||
application/vnd.cups-postscript
|
||||
application/vnd.cups-raster
|
||||
application/vnd.cups-raw
|
||||
application/vnd.curl
|
||||
application/vnd.cybank
|
||||
application/vnd.data-vision.rdz
|
||||
application/vnd.dna
|
||||
application/vnd.dpgraph
|
||||
application/vnd.dreamfactory
|
||||
application/vnd.dxr
|
||||
application/vnd.ecdis-update
|
||||
application/vnd.ecowin.chart
|
||||
application/vnd.ecowin.filerequest
|
||||
application/vnd.ecowin.fileupdate
|
||||
application/vnd.ecowin.series
|
||||
application/vnd.ecowin.seriesrequest
|
||||
application/vnd.ecowin.seriesupdate
|
||||
application/vnd.enliven
|
||||
application/vnd.epson.esf
|
||||
application/vnd.epson.msf
|
||||
application/vnd.epson.quickanime
|
||||
application/vnd.epson.salt
|
||||
application/vnd.epson.ssf
|
||||
application/vnd.ericsson.quickcall
|
||||
application/vnd.eudora.data
|
||||
application/vnd.fdf
|
||||
application/vnd.ffsns
|
||||
application/vnd.fints
|
||||
application/vnd.flographit
|
||||
application/vnd.framemaker
|
||||
application/vnd.fsc.weblaunch
|
||||
application/vnd.fujitsu.oasys
|
||||
application/vnd.fujitsu.oasys2
|
||||
application/vnd.fujitsu.oasys3
|
||||
application/vnd.fujitsu.oasysgp
|
||||
application/vnd.fujitsu.oasysprs
|
||||
application/vnd.fujixerox.ddd
|
||||
application/vnd.fujixerox.docuworks
|
||||
application/vnd.fujixerox.docuworks.binder
|
||||
application/vnd.fut-misnet
|
||||
application/vnd.grafeq
|
||||
application/vnd.groove-account
|
||||
application/vnd.groove-help
|
||||
application/vnd.groove-identity-message
|
||||
application/vnd.groove-injector
|
||||
application/vnd.groove-tool-message
|
||||
application/vnd.groove-tool-template
|
||||
application/vnd.groove-vcard
|
||||
application/vnd.hbci
|
||||
application/vnd.hhe.lesson-player
|
||||
application/vnd.hp-hpgl
|
||||
application/vnd.hp-hpid
|
||||
application/vnd.hp-hps
|
||||
application/vnd.hp-pcl
|
||||
application/vnd.hp-pclxl
|
||||
application/vnd.httphone
|
||||
application/vnd.hzn-3d-crossword
|
||||
application/vnd.ibm.afplinedata
|
||||
application/vnd.ibm.electronic-media
|
||||
application/vnd.ibm.minipay
|
||||
application/vnd.ibm.modcap
|
||||
application/vnd.ibm.rights-management
|
||||
application/vnd.ibm.secure-container
|
||||
application/vnd.informix-visionary
|
||||
application/vnd.intercon.formnet
|
||||
application/vnd.intertrust.digibox
|
||||
application/vnd.intertrust.nncp
|
||||
application/vnd.intu.qbo
|
||||
application/vnd.intu.qfx
|
||||
application/vnd.irepository.package+xml
|
||||
application/vnd.is-xpr
|
||||
application/vnd.japannet-directory-service
|
||||
application/vnd.japannet-jpnstore-wakeup
|
||||
application/vnd.japannet-payment-wakeup
|
||||
application/vnd.japannet-registration
|
||||
application/vnd.japannet-registration-wakeup
|
||||
application/vnd.japannet-setstore-wakeup
|
||||
application/vnd.japannet-verification
|
||||
application/vnd.japannet-verification-wakeup
|
||||
application/vnd.jisp
|
||||
application/vnd.kde.karbon
|
||||
application/vnd.kde.kchart
|
||||
application/vnd.kde.kformula
|
||||
application/vnd.kde.kivio
|
||||
application/vnd.kde.kontour
|
||||
application/vnd.kde.kpresenter
|
||||
application/vnd.kde.kspread
|
||||
application/vnd.kde.kword
|
||||
application/vnd.kenameaapp
|
||||
application/vnd.koan
|
||||
application/vnd.liberty-request+xml
|
||||
application/vnd.llamagraphics.life-balance.desktop
|
||||
application/vnd.llamagraphics.life-balance.exchange+xml
|
||||
application/vnd.lotus-1-2-3
|
||||
application/vnd.lotus-approach
|
||||
application/vnd.lotus-freelance
|
||||
application/vnd.lotus-notes
|
||||
application/vnd.lotus-organizer
|
||||
application/vnd.lotus-screencam
|
||||
application/vnd.lotus-wordpro
|
||||
application/vnd.mcd
|
||||
application/vnd.mediastation.cdkey
|
||||
application/vnd.meridian-slingshot
|
||||
application/vnd.micrografx.flo
|
||||
application/vnd.micrografx.igx
|
||||
application/vnd.mif mif
|
||||
application/vnd.minisoft-hp3000-save
|
||||
application/vnd.mitsubishi.misty-guard.trustweb
|
||||
application/vnd.mobius.daf
|
||||
application/vnd.mobius.dis
|
||||
application/vnd.mobius.mbk
|
||||
application/vnd.mobius.mqy
|
||||
application/vnd.mobius.msl
|
||||
application/vnd.mobius.plc
|
||||
application/vnd.mobius.txf
|
||||
application/vnd.mophun.application
|
||||
application/vnd.mophun.certificate
|
||||
application/vnd.motorola.flexsuite
|
||||
application/vnd.motorola.flexsuite.adsi
|
||||
application/vnd.motorola.flexsuite.fis
|
||||
application/vnd.motorola.flexsuite.gotap
|
||||
application/vnd.motorola.flexsuite.kmr
|
||||
application/vnd.motorola.flexsuite.ttc
|
||||
application/vnd.motorola.flexsuite.wem
|
||||
application/vnd.mozilla.xul+xml xul
|
||||
application/vnd.ms-artgalry
|
||||
application/vnd.ms-asf
|
||||
application/vnd.ms-excel xls
|
||||
application/vnd.ms-lrm
|
||||
application/vnd.ms-powerpoint ppt
|
||||
application/vnd.ms-project
|
||||
application/vnd.ms-tnef
|
||||
application/vnd.ms-works
|
||||
application/vnd.ms-wpl
|
||||
application/vnd.mseq
|
||||
application/vnd.msign
|
||||
application/vnd.music-niff
|
||||
application/vnd.musician
|
||||
application/vnd.netfpx
|
||||
application/vnd.noblenet-directory
|
||||
application/vnd.noblenet-sealer
|
||||
application/vnd.noblenet-web
|
||||
application/vnd.novadigm.edm
|
||||
application/vnd.novadigm.edx
|
||||
application/vnd.novadigm.ext
|
||||
application/vnd.obn
|
||||
application/vnd.osa.netdeploy
|
||||
application/vnd.palm
|
||||
application/vnd.pg.format
|
||||
application/vnd.pg.osasli
|
||||
application/vnd.powerbuilder6
|
||||
application/vnd.powerbuilder6-s
|
||||
application/vnd.powerbuilder7
|
||||
application/vnd.powerbuilder7-s
|
||||
application/vnd.powerbuilder75
|
||||
application/vnd.powerbuilder75-s
|
||||
application/vnd.previewsystems.box
|
||||
application/vnd.publishare-delta-tree
|
||||
application/vnd.pvi.ptid1
|
||||
application/vnd.pwg-multiplexed
|
||||
application/vnd.pwg-xhtml-print+xml
|
||||
application/vnd.quark.quarkxpress
|
||||
application/vnd.rapid
|
||||
application/vnd.rn-realmedia rm
|
||||
application/vnd.s3sms
|
||||
application/vnd.sealed.net
|
||||
application/vnd.seemail
|
||||
application/vnd.shana.informed.formdata
|
||||
application/vnd.shana.informed.formtemplate
|
||||
application/vnd.shana.informed.interchange
|
||||
application/vnd.shana.informed.package
|
||||
application/vnd.smaf
|
||||
application/vnd.sss-cod
|
||||
application/vnd.sss-dtf
|
||||
application/vnd.sss-ntf
|
||||
application/vnd.street-stream
|
||||
application/vnd.svd
|
||||
application/vnd.swiftview-ics
|
||||
application/vnd.triscape.mxs
|
||||
application/vnd.trueapp
|
||||
application/vnd.truedoc
|
||||
application/vnd.ufdl
|
||||
application/vnd.uplanet.alert
|
||||
application/vnd.uplanet.alert-wbxml
|
||||
application/vnd.uplanet.bearer-choice
|
||||
application/vnd.uplanet.bearer-choice-wbxml
|
||||
application/vnd.uplanet.cacheop
|
||||
application/vnd.uplanet.cacheop-wbxml
|
||||
application/vnd.uplanet.channel
|
||||
application/vnd.uplanet.channel-wbxml
|
||||
application/vnd.uplanet.list
|
||||
application/vnd.uplanet.list-wbxml
|
||||
application/vnd.uplanet.listcmd
|
||||
application/vnd.uplanet.listcmd-wbxml
|
||||
application/vnd.uplanet.signal
|
||||
application/vnd.vcx
|
||||
application/vnd.vectorworks
|
||||
application/vnd.vidsoft.vidconference
|
||||
application/vnd.visio
|
||||
application/vnd.visionary
|
||||
application/vnd.vividence.scriptfile
|
||||
application/vnd.vsf
|
||||
application/vnd.wap.sic
|
||||
application/vnd.wap.slc
|
||||
application/vnd.wap.xhtml+xml xhtmlmp
|
||||
application/vnd.wap.wbxml wbxml
|
||||
application/vnd.wap.wmlc wmlc
|
||||
application/vnd.wap.wmlscriptc wmlsc
|
||||
application/vnd.webturbo
|
||||
application/vnd.wrq-hp3000-labelled
|
||||
application/vnd.wt.stf
|
||||
application/vnd.wv.csp+wbxml
|
||||
application/vnd.xara
|
||||
application/vnd.xfdl
|
||||
application/vnd.yamaha.hv-dic
|
||||
application/vnd.yamaha.hv-script
|
||||
application/vnd.yamaha.hv-voice
|
||||
application/vnd.yellowriver-custom-menu
|
||||
application/voicexml+xml vxml
|
||||
application/watcherinfo+xml
|
||||
application/whoispp-query
|
||||
application/whoispp-response
|
||||
application/wita
|
||||
application/wordperfect5.1
|
||||
application/x-bcpio bcpio
|
||||
application/x-cdlink vcd
|
||||
application/x-chess-pgn pgn
|
||||
application/x-compress
|
||||
application/x-cpio cpio
|
||||
application/x-csh csh
|
||||
application/x-director dcr dir dxr
|
||||
application/x-dvi dvi
|
||||
application/x-futuresplash spl
|
||||
application/x-gtar gtar
|
||||
application/x-gzip
|
||||
application/x-hdf hdf
|
||||
application/x-javascript js
|
||||
application/x-java-jnlp-file jnlp
|
||||
application/x-koan skp skd skt skm
|
||||
application/x-latex latex
|
||||
application/x-netcdf nc cdf
|
||||
application/x-sh sh
|
||||
application/x-shar shar
|
||||
application/x-shockwave-flash swf
|
||||
application/x-stuffit sit
|
||||
application/x-sv4cpio sv4cpio
|
||||
application/x-sv4crc sv4crc
|
||||
application/x-tar tar
|
||||
application/x-tcl tcl
|
||||
application/x-tex tex
|
||||
application/x-texinfo texinfo texi
|
||||
application/x-troff t tr roff
|
||||
application/x-troff-man man
|
||||
application/x-troff-me me
|
||||
application/x-troff-ms ms
|
||||
application/x-ustar ustar
|
||||
application/x-wais-source src
|
||||
application/x400-bp
|
||||
application/xhtml+xml xhtml xht
|
||||
application/xslt+xml xslt
|
||||
application/xml xml xsl
|
||||
application/xml-dtd dtd
|
||||
application/xml-external-parsed-entity
|
||||
application/zip zip
|
||||
audio/32kadpcm
|
||||
audio/amr
|
||||
audio/amr-wb
|
||||
audio/basic au snd
|
||||
audio/cn
|
||||
audio/dat12
|
||||
audio/dsr-es201108
|
||||
audio/dvi4
|
||||
audio/evrc
|
||||
audio/evrc0
|
||||
audio/g722
|
||||
audio/g.722.1
|
||||
audio/g723
|
||||
audio/g726-16
|
||||
audio/g726-24
|
||||
audio/g726-32
|
||||
audio/g726-40
|
||||
audio/g728
|
||||
audio/g729
|
||||
audio/g729D
|
||||
audio/g729E
|
||||
audio/gsm
|
||||
audio/gsm-efr
|
||||
audio/l8
|
||||
audio/l16
|
||||
audio/l20
|
||||
audio/l24
|
||||
audio/lpc
|
||||
audio/midi mid midi kar
|
||||
audio/mpa
|
||||
audio/mpa-robust
|
||||
audio/mp4a-latm m4a m4p
|
||||
audio/mpeg mpga mp2 mp3
|
||||
audio/parityfec
|
||||
audio/pcma
|
||||
audio/pcmu
|
||||
audio/prs.sid
|
||||
audio/qcelp
|
||||
audio/red
|
||||
audio/smv
|
||||
audio/smv0
|
||||
audio/telephone-event
|
||||
audio/tone
|
||||
audio/vdvi
|
||||
audio/vnd.3gpp.iufp
|
||||
audio/vnd.cisco.nse
|
||||
audio/vnd.cns.anp1
|
||||
audio/vnd.cns.inf1
|
||||
audio/vnd.digital-winds
|
||||
audio/vnd.everad.plj
|
||||
audio/vnd.lucent.voice
|
||||
audio/vnd.nortel.vbk
|
||||
audio/vnd.nuera.ecelp4800
|
||||
audio/vnd.nuera.ecelp7470
|
||||
audio/vnd.nuera.ecelp9600
|
||||
audio/vnd.octel.sbc
|
||||
audio/vnd.qcelp
|
||||
audio/vnd.rhetorex.32kadpcm
|
||||
audio/vnd.vmx.cvsd
|
||||
audio/x-aiff aif aiff aifc
|
||||
audio/x-alaw-basic
|
||||
audio/x-mpegurl m3u
|
||||
audio/x-pn-realaudio ram ra
|
||||
audio/x-pn-realaudio-plugin
|
||||
audio/x-wav wav
|
||||
chemical/x-pdb pdb
|
||||
chemical/x-xyz xyz
|
||||
image/bmp bmp
|
||||
image/cgm cgm
|
||||
image/g3fax
|
||||
image/gif gif
|
||||
image/ief ief
|
||||
image/jpeg jpeg jpg jpe
|
||||
image/jp2 jp2
|
||||
image/naplps
|
||||
image/pict pict pic pct
|
||||
image/png png
|
||||
image/prs.btif
|
||||
image/prs.pti
|
||||
image/svg+xml svg
|
||||
image/t38
|
||||
image/tiff tiff tif
|
||||
image/tiff-fx
|
||||
image/vnd.cns.inf2
|
||||
image/vnd.djvu djvu djv
|
||||
image/vnd.dwg
|
||||
image/vnd.dxf
|
||||
image/vnd.fastbidsheet
|
||||
image/vnd.fpx
|
||||
image/vnd.fst
|
||||
image/vnd.fujixerox.edmics-mmr
|
||||
image/vnd.fujixerox.edmics-rlc
|
||||
image/vnd.globalgraphics.pgb
|
||||
image/vnd.mix
|
||||
image/vnd.ms-modi
|
||||
image/vnd.net-fpx
|
||||
image/vnd.svf
|
||||
image/vnd.wap.wbmp wbmp
|
||||
image/vnd.xiff
|
||||
image/x-cmu-raster ras
|
||||
image/x-macpaint pntg pnt mac
|
||||
image/x-icon ico
|
||||
image/x-portable-anymap pnm
|
||||
image/x-portable-bitmap pbm
|
||||
image/x-portable-graymap pgm
|
||||
image/x-portable-pixmap ppm
|
||||
image/x-quicktime qtif qti
|
||||
image/x-rgb rgb
|
||||
image/x-xbitmap xbm
|
||||
image/x-xpixmap xpm
|
||||
image/x-xwindowdump xwd
|
||||
message/delivery-status
|
||||
message/disposition-notification
|
||||
message/external-body
|
||||
message/http
|
||||
message/news
|
||||
message/partial
|
||||
message/rfc822
|
||||
message/s-http
|
||||
message/sip
|
||||
message/sipfrag
|
||||
model/iges igs iges
|
||||
model/mesh msh mesh silo
|
||||
model/vnd.dwf
|
||||
model/vnd.flatland.3dml
|
||||
model/vnd.gdl
|
||||
model/vnd.gs-gdl
|
||||
model/vnd.gtw
|
||||
model/vnd.mts
|
||||
model/vnd.parasolid.transmit.binary
|
||||
model/vnd.parasolid.transmit.text
|
||||
model/vnd.vtu
|
||||
model/vrml wrl vrml
|
||||
multipart/alternative
|
||||
multipart/appledouble
|
||||
multipart/byteranges
|
||||
multipart/digest
|
||||
multipart/encrypted
|
||||
multipart/form-data
|
||||
multipart/header-set
|
||||
multipart/mixed
|
||||
multipart/parallel
|
||||
multipart/related
|
||||
multipart/report
|
||||
multipart/signed
|
||||
multipart/voice-message
|
||||
text/cache-manifest manifest
|
||||
text/calendar ics ifb
|
||||
text/css css
|
||||
text/directory
|
||||
text/enriched
|
||||
text/html html htm
|
||||
text/parityfec
|
||||
text/plain asc txt
|
||||
text/prs.lines.tag
|
||||
text/rfc822-headers
|
||||
text/richtext rtx
|
||||
text/rtf rtf
|
||||
text/sgml sgml sgm
|
||||
text/t140
|
||||
text/tab-separated-values tsv
|
||||
text/uri-list
|
||||
text/vnd.abc
|
||||
text/vnd.curl
|
||||
text/vnd.dmclientscript
|
||||
text/vnd.fly
|
||||
text/vnd.fmi.flexstor
|
||||
text/vnd.in3d.3dml
|
||||
text/vnd.in3d.spot
|
||||
text/vnd.iptc.nitf
|
||||
text/vnd.iptc.newsml
|
||||
text/vnd.latex-z
|
||||
text/vnd.motorola.reflex
|
||||
text/vnd.ms-mediapackage
|
||||
text/vnd.net2phone.commcenter.command
|
||||
text/vnd.sun.j2me.app-descriptor
|
||||
text/vnd.wap.si
|
||||
text/vnd.wap.sl
|
||||
text/vnd.wap.wml wml
|
||||
text/vnd.wap.wmlscript wmls
|
||||
text/x-setext etx
|
||||
text/xml
|
||||
text/xml-external-parsed-entity
|
||||
video/bmpeg
|
||||
video/bt656
|
||||
video/celb
|
||||
video/dv
|
||||
video/h261
|
||||
video/h263
|
||||
video/h263-1998
|
||||
video/h263-2000
|
||||
video/jpeg
|
||||
video/mp1s
|
||||
video/mp2p
|
||||
video/mp2t
|
||||
video/mp4 mp4
|
||||
video/mp4v-es
|
||||
video/mpv
|
||||
video/mpeg mpeg mpg mpe
|
||||
video/nv
|
||||
video/parityfec
|
||||
video/pointer
|
||||
video/quicktime qt mov
|
||||
video/smpte292m
|
||||
video/vnd.fvt
|
||||
video/vnd.motorola.video
|
||||
video/vnd.motorola.videop
|
||||
video/vnd.mpegurl mxu m4u
|
||||
video/vnd.nokia.interleaved-multimedia
|
||||
video/vnd.objectvideo
|
||||
video/vnd.vivo
|
||||
video/x-dv dv dif
|
||||
video/x-msvideo avi
|
||||
video/x-sgi-movie movie
|
||||
x-conference/x-cooltalk ice
|
28
engine/src/flutter/tests/http/conf/webkit-httpd.pem
Normal file
28
engine/src/flutter/tests/http/conf/webkit-httpd.pem
Normal file
@ -0,0 +1,28 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXQIBAAKBgQCmcXbusrr8zQr8snIb0OVQibVfgv7zPjh/5xdcrKOejJzp3epA
|
||||
AF4TITeFR9vzWIwkmkcRoY+IbQNhh7kefGUYD47bvVamJMtq5cGYVs0HngT+KTMa
|
||||
NGH/G44KkFIOaz/b5d/JNKONrlqwxqXS+m6IY4l/E1Ff25ZjND5TaEvI1wIDAQAB
|
||||
AoGBAIcDv4A9h6UOBv2ZGyspNvsv2erSblGOhXJrWO4aNNemJJspIp4sLiPCbDE3
|
||||
a1po17XRWBkbPz1hgL6axDXQnoeo++ebfrvRSed+Fys4+6SvuSrPOv6PmWTBT/Wa
|
||||
GpO+tv48JUNxC/Dy8ROixBXOViuIBEFq3NfVH4HU3+RG20NhAkEA1L3RAhdfPkLI
|
||||
82luSOYE3Eq44lICb/yZi+JEihwSeZTJKdZHwYD8KVCjOtjGrOmyEyvThrcIACQz
|
||||
JLEreVh33wJBAMhJm9pzJJNkIyBgiXA66FAwbhdDzSTPx0OBjoVWoj6u7jzGvIFT
|
||||
Cn1aiTBYzzsiMCaCx+W3e6pK/DcvHSwKrgkCQHZMcxwBmSHLC2lnmD8LQWqqVnLr
|
||||
fZV+VnfVw501DQT0uoP8NvygWBg1Uf9YKepfLXnBpidEQjup5ZKivnUEv+sCQA8N
|
||||
6VcMHI2vkyxV1T7ITrnoSf4ZrIu9yl56mHnRPzSy9VlAHt8hnMI7UeB+bGUndrMO
|
||||
VXQgzHzKUhbbxbePvfECQQDTtkOuhJyKDfHCxLDcwNpi+T6OWTEfCw/cq9ZWDbA7
|
||||
yCX81pQxfZkfMIS1YFIOGHovK0rMMTraCe+iDNYtVz/L
|
||||
-----END RSA PRIVATE KEY-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB9zCCAWACCQDjWWTeC6BQvTANBgkqhkiG9w0BAQQFADBAMQswCQYDVQQGEwJB
|
||||
VTETMBEGA1UECBMKU29tZS1TdGF0ZTEcMBoGA1UEChMTV2ViS2l0IExheW91dCBU
|
||||
ZXN0czAeFw0wNzA3MTMxMjUxMzJaFw03MTA1MTMwNjIzMTZaMEAxCzAJBgNVBAYT
|
||||
AkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMRwwGgYDVQQKExNXZWJLaXQgTGF5b3V0
|
||||
IFRlc3RzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmcXbusrr8zQr8snIb
|
||||
0OVQibVfgv7zPjh/5xdcrKOejJzp3epAAF4TITeFR9vzWIwkmkcRoY+IbQNhh7ke
|
||||
fGUYD47bvVamJMtq5cGYVs0HngT+KTMaNGH/G44KkFIOaz/b5d/JNKONrlqwxqXS
|
||||
+m6IY4l/E1Ff25ZjND5TaEvI1wIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAAfbUbgD
|
||||
01O8DoZA02c1MUMbMHRPSb/qdok2pyWoCPa/BSaOIaNPePc8auPRbrS2XsVWSMft
|
||||
CTXiXmrK2Xx1+fJuZLAp0CUng4De4cDH5c8nvlocYmXo+1x53S9DfD0KPryjBRI7
|
||||
9LnJq2ysHAUawiqFXlwBag6mXawD8YjzcYat
|
||||
-----END CERTIFICATE-----
|
@ -0,0 +1 @@
|
||||
Done!
|
@ -0,0 +1,6 @@
|
||||
CONSOLE: LOG: DOM.childNodeInserted
|
||||
CONSOLE: LOG: 2
|
||||
CONSOLE: LOG: 3
|
||||
CONSOLE: LOG: DOM.childNodeInserted
|
||||
CONSOLE: LOG: 3
|
||||
adding
|
@ -0,0 +1,34 @@
|
||||
<html>
|
||||
<link rel="import" href="inspector/backend/dom-agent.html" as="DOMAgent" />
|
||||
<div></div>
|
||||
<script>
|
||||
// FIXME: This shows a bug in our DOM mutation handling, we should
|
||||
// only get one childNodeInserted record here, but we get two, which
|
||||
// means the inspector shows two nodes where it should only show one.
|
||||
|
||||
// setTimeout to flush pending DOM modifications and measure
|
||||
// only the changes we want to.
|
||||
setTimeout(function() {
|
||||
var delegate = {
|
||||
sendMessage: function(message, params) {
|
||||
console.log(message);
|
||||
if (params.node)
|
||||
console.log(params.node.nodeId);
|
||||
if (params.node && params.node.children)
|
||||
console.log(params.node.children[0].nodeId);
|
||||
}
|
||||
};
|
||||
|
||||
var domAgent = new DOMAgent(delegate);
|
||||
domAgent.enable();
|
||||
|
||||
var adding = document.createElement('adding');
|
||||
document.querySelector('div').appendChild(adding);
|
||||
adding.textContent = 'adding';
|
||||
|
||||
setTimeout(function() {
|
||||
internals.notifyTestComplete(internals.contentAsText());
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
37
engine/src/flutter/tests/inspector/dom-mutation.html
Normal file
37
engine/src/flutter/tests/inspector/dom-mutation.html
Normal file
@ -0,0 +1,37 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="inspector/backend/dom-agent.html" as="DOMAgent" />
|
||||
<div><div></div></div>
|
||||
<script>
|
||||
// setTimeout to flush pending DOM modifications and measure
|
||||
// only the changes we want to.
|
||||
var expectedMessages = [
|
||||
'DOM.childNodeRemoved',
|
||||
'DOM.childNodeInserted',
|
||||
];
|
||||
var actualMessages = [];
|
||||
|
||||
setTimeout(function() {
|
||||
var delegate = {
|
||||
sendMessage: function(message, params) {
|
||||
actualMessages.push(message);
|
||||
}
|
||||
};
|
||||
|
||||
var domAgent = new DOMAgent(delegate);
|
||||
domAgent.enable();
|
||||
|
||||
var adding = document.createElement('adding');
|
||||
var container = document.querySelector('div');
|
||||
container.firstChild.remove();
|
||||
container.appendChild(document.createElement('adding'));
|
||||
|
||||
setTimeout(function() {
|
||||
assert.equal(JSON.stringify(expectedMessages),
|
||||
JSON.stringify(actualMessages));
|
||||
internals.notifyTestComplete("Done!");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</html>
|
45
engine/src/flutter/tests/lowlevel/abarth-expected.txt
Normal file
45
engine/src/flutter/tests/lowlevel/abarth-expected.txt
Normal file
@ -0,0 +1,45 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
layer at (0,0) size 800x600
|
||||
RenderBlock {html} at (0,0) size 800x600
|
||||
RenderBlock {head} at (0,0) size 800x0
|
||||
RenderBlock {body} at (0,0) size 800x600 [bgcolor=#FFFFFF]
|
||||
RenderBlock {div} at (0,0) size 800x265
|
||||
RenderBlock {div} at (0,0) size 800x115
|
||||
RenderBlock {div} at (15,15) size 770x49
|
||||
RenderInline {a} at (0,0) size 242x48 [color=#333333]
|
||||
RenderText {#text} at (528,0) size 242x48
|
||||
text run at (528,0) width 242: "Adam Barth"
|
||||
RenderBlock {div} at (15,64) size 770x36
|
||||
RenderBlock {div} at (0,0) size 770x18
|
||||
RenderText {#text} at (574,0) size 196x17
|
||||
text run at (574,0) width 196: "Ph.D., M.S., Stanford, 2008"
|
||||
RenderBlock {div} at (0,18) size 770x18
|
||||
RenderText {#text} at (635,0) size 135x17
|
||||
text run at (635,0) width 135: "B.A., Cornell, 2003"
|
||||
RenderBlock {div} at (0,115) size 800x150
|
||||
RenderBlock {div} at (0,19) size 800x28
|
||||
RenderInline {a} at (0,0) size 93x17 [color=#333333]
|
||||
RenderText {#text} at (692,5) size 93x17
|
||||
text run at (692,5) width 93: "@adambarth"
|
||||
RenderBlock {div} at (0,47) size 800x28
|
||||
RenderInline {a} at (0,0) size 35x17 [color=#333333]
|
||||
RenderText {#text} at (750,5) size 35x17
|
||||
text run at (750,5) width 35: "Blink"
|
||||
RenderBlock {div} at (0,75) size 800x28
|
||||
RenderInline {a} at (0,0) size 74x17 [color=#333333]
|
||||
RenderText {#text} at (711,5) size 74x17
|
||||
text run at (711,5) width 74: "Chromium"
|
||||
RenderBlock {div} at (0,103) size 800x28
|
||||
RenderInline {a} at (0,0) size 87x17 [color=#333333]
|
||||
RenderText {#text} at (698,5) size 87x17
|
||||
text run at (698,5) width 87: "Publications"
|
||||
layer at (686,582) size 114x18
|
||||
RenderBlock (positioned) {div} at (686.19,582) size 113.81x18 [color=#333333]
|
||||
RenderText {#text} at (3,3) size 73x12
|
||||
text run at (3,3) width 73: "Photograph by "
|
||||
RenderInline {a} at (0,0) size 36x12
|
||||
RenderText {#text} at (75,3) size 36x12
|
||||
text run at (75,3) width 36: "J\x{E9}r\x{F4}me"
|
||||
RenderText {#text} at (0,0) size 0x0
|
||||
|
79
engine/src/flutter/tests/lowlevel/abarth.html
Normal file
79
engine/src/flutter/tests/lowlevel/abarth.html
Normal file
@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="import" href="../resources/dump-as-render-tree.html" />
|
||||
<title>Adam Barth</title>
|
||||
<style>
|
||||
html {
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
background-color: white;
|
||||
margin: 0;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center top;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.photograph-credit {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 3px;
|
||||
font-size: 8pt;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.name a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.bio {
|
||||
padding: 15px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
font-size: 32pt;
|
||||
}
|
||||
|
||||
.links {
|
||||
padding: 19px 0;
|
||||
}
|
||||
|
||||
.link {
|
||||
padding: 5px 15px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="card">
|
||||
<div class="bio">
|
||||
<div class="name"><a href="./">Adam Barth</a></div>
|
||||
<div class="education">
|
||||
<div class="line">Ph.D., M.S., Stanford, 2008</div>
|
||||
<div class="line">B.A., Cornell, 2003</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="links">
|
||||
<div class="link"><a href="http://twitter.com/adambarth">@adambarth</a></div>
|
||||
<div class="link"><a href="http://dev.chromium.org/blink">Blink</a></div>
|
||||
<div class="link"><a href="http://blog.chromium.org/">Chromium</a></div>
|
||||
<div class="link"><a href="papers/">Publications</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="photograph-credit">
|
||||
Photograph by <a href="http://www.flickr.com/photos/lesphotosdejerome/">Jérôme</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,9 @@
|
||||
Running 5 tests
|
||||
ok 1 Attribute collection should get by index
|
||||
ok 2 Attribute collection should get by name
|
||||
ok 3 Attribute collection should set by name
|
||||
ok 4 Attribute collection should be case sensitive
|
||||
ok 5 Attribute collection should live update
|
||||
5 tests
|
||||
5 pass
|
||||
0 fail
|
56
engine/src/flutter/tests/lowlevel/attribute-collection.html
Normal file
56
engine/src/flutter/tests/lowlevel/attribute-collection.html
Normal file
@ -0,0 +1,56 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<script>
|
||||
describe("Attribute collection", function() {
|
||||
var div;
|
||||
beforeEach(function() {
|
||||
div = document.createElement("div");
|
||||
});
|
||||
|
||||
it("should get by index", function() {
|
||||
div.setAttribute("attr0", "value0");
|
||||
div.setAttribute("attr1", "value1");
|
||||
assert.equal(div.attributes.length, 2);
|
||||
assert.equal(div.attributes[0].name, "attr0");
|
||||
assert.equal(div.attributes[0].value, "value0");
|
||||
assert.equal(div.attributes[1].name, "attr1");
|
||||
assert.equal(div.attributes[1].value, "value1");
|
||||
});
|
||||
it("should get by name", function() {
|
||||
div.setAttribute("attr0", "value0");
|
||||
div.setAttribute("attr1", "value1");
|
||||
assert.equal(div.attributes.length, 2);
|
||||
assert.equal(div.attributes.attr0.value, "value0");
|
||||
assert.equal(div.attributes.attr1.value, "value1");
|
||||
});
|
||||
it("should set by name", function() {
|
||||
div.setAttribute("attrName", "value0");
|
||||
div.attributes.attrName.value = "new value";
|
||||
assert.equal(div.getAttribute("attrName"), "new value");
|
||||
assert.equal(div.attributes.attrName.value, "new value");
|
||||
});
|
||||
it("should be case sensitive", function() {
|
||||
div.setAttribute("attrName", "value0");
|
||||
assert.isUndefined(div.attributes.attrname);
|
||||
assert.ok(div.attributes.attrName);
|
||||
assert.equal(div.attributes.attrName.value, "value0");
|
||||
});
|
||||
it("should live update", function() {
|
||||
div.setAttribute("attr0", "");
|
||||
div.setAttribute("attr1", "");
|
||||
div.setAttribute("attr2", "");
|
||||
assert.equal(div.attributes.length, 3);
|
||||
div.removeAttribute("attr1");
|
||||
assert.equal(div.attributes.length, 2);
|
||||
assert.equal(div.attributes[0].name, "attr0");
|
||||
assert.equal(div.attributes[1].name, "attr2");
|
||||
div.setAttribute("attr3", "");
|
||||
div.setAttribute("attr2", "value2");
|
||||
assert.equal(div.attributes.length, 3);
|
||||
assert.equal(div.attributes[2].name, "attr3");
|
||||
assert.equal(div.attributes.attr2.value, "value2");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 Element tag names should have various casing
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
14
engine/src/flutter/tests/lowlevel/camel-case.html
Normal file
14
engine/src/flutter/tests/lowlevel/camel-case.html
Normal file
@ -0,0 +1,14 @@
|
||||
<CamelCase>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
describe('Element tag names', function() {
|
||||
it('should have various casing', function() {
|
||||
assert.equal(document.documentElement.tagName, 'camelcase');
|
||||
|
||||
var element = document.createElement('CamelCase');
|
||||
assert.equal(element.tagName, 'CamelCase');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</CamelCase>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 createElementNS tests from mozilla, attached to webkit bug 16833 should behave like mozilla
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
112
engine/src/flutter/tests/lowlevel/createElement.html
Normal file
112
engine/src/flutter/tests/lowlevel/createElement.html
Normal file
@ -0,0 +1,112 @@
|
||||
<test>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
describe('createElementNS tests from mozilla, attached to webkit bug 16833', function() {
|
||||
it('should behave like mozilla', function() {
|
||||
function stringForExceptionCode(c)
|
||||
{
|
||||
var exceptionName;
|
||||
switch(c) {
|
||||
case DOMException.INVALID_CHARACTER_ERR:
|
||||
exceptionName = "INVALID_CHARACTER_ERR";
|
||||
break;
|
||||
case DOMException.NAMESPACE_ERR:
|
||||
exceptionName = "NAMESPACE_ERR";
|
||||
}
|
||||
if (exceptionName)
|
||||
return exceptionName; // + "(" + c + ")";
|
||||
return c;
|
||||
}
|
||||
|
||||
function assertExceptionCode(exception, expect, m)
|
||||
{
|
||||
var actual = exception.code;
|
||||
if (actual !== expect) {
|
||||
m += "; expected " + stringForExceptionCode(expect) + ", threw " + stringForExceptionCode(actual);
|
||||
assert.ok(false, m);
|
||||
} else {
|
||||
m += "; threw " + exception.toString();
|
||||
assert.ok(true, m);
|
||||
}
|
||||
}
|
||||
|
||||
var allNoNSTests = [
|
||||
{ args: [undefined] },
|
||||
{ args: [null] },
|
||||
{ args: [""], code: 5 },
|
||||
{ args: ["<div>"], code: 5 },
|
||||
{ args: ["0div"], code: 5 },
|
||||
{ args: ["di v"], code: 5 },
|
||||
{ args: ["di<v"], code: 5 },
|
||||
{ args: ["-div"], code: 5 },
|
||||
{ args: [".div"], code: 5 },
|
||||
{ args: [":"], message: "valid XML name, invalid QName" },
|
||||
{ args: [":div"], message: "valid XML name, invalid QName" },
|
||||
{ args: ["div:"], message: "valid XML name, invalid QName" },
|
||||
{ args: ["d:iv"] },
|
||||
{ args: ["a:b:c"], message: "valid XML name, invalid QName" },
|
||||
{ args: ["a::c"], message: "valid XML name, invalid QName" },
|
||||
{ args: ["a::c:"], message: "valid XML name, invalid QName" },
|
||||
{ args: ["a:0"], message: "valid XML name, not a valid QName" },
|
||||
{ args: ["0:a"], code: 5, message: "0 at start makes it not a valid XML name" },
|
||||
{ args: ["a:_"] },
|
||||
{ args: ["a:\u0BC6"],
|
||||
message: "non-ASCII character after colon is CombiningChar, which is " +
|
||||
"valid in pre-namespace XML" },
|
||||
{ args: ["\u0BC6:a"], code: 5, message: "not a valid start character" },
|
||||
{ args: ["a:a\u0BC6"] },
|
||||
{ args: ["a\u0BC6:a"] },
|
||||
{ args: ["xml:test"] },
|
||||
{ args: ["xmlns:test"] },
|
||||
{ args: ["x:test"] },
|
||||
{ args: ["xmlns:test"] },
|
||||
{ args: ["SOAP-ENV:Body"] }, // From Yahoo Mail Beta
|
||||
];
|
||||
|
||||
function sourceify(v)
|
||||
{
|
||||
switch (typeof v) {
|
||||
case "undefined":
|
||||
return v;
|
||||
case "string":
|
||||
return '"' + v.replace('"', '\\"') + '"';
|
||||
default:
|
||||
return String(v);
|
||||
}
|
||||
}
|
||||
|
||||
function sourceifyArgs(args)
|
||||
{
|
||||
var copy = new Array(args.length);
|
||||
for (var i = 0, sz = args.length; i < sz; i++)
|
||||
copy[i] = sourceify(args[i]);
|
||||
|
||||
return copy.join(", ");
|
||||
}
|
||||
|
||||
function runNSTests(tests, doc, createFunctionName)
|
||||
{
|
||||
for (var i = 0, sz = tests.length; i < sz; i++) {
|
||||
var test = tests[i];
|
||||
|
||||
var code = -1;
|
||||
var argStr = sourceifyArgs(test.args);
|
||||
var msg = createFunctionName + "(" + argStr + ")";
|
||||
if ("message" in test)
|
||||
msg += "; " + test.message;
|
||||
try {
|
||||
doc[createFunctionName].apply(doc, test.args);
|
||||
assert(!("code" in test), msg);
|
||||
} catch (e) {
|
||||
assertExceptionCode(e, test.code || "expected no exception", msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var doc = document.implementation.createDocument();
|
||||
runNSTests(allNoNSTests, doc, "createElement");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</test>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 DOMImplementation should let you create a document
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
@ -0,0 +1,15 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
describe('DOMImplementation', function() {
|
||||
it('should let you create a document', function() {
|
||||
var doc = document.implementation.createDocument();
|
||||
assert.isNotNull(doc, 'createDocument should return a value');
|
||||
assert.doesNotThrow(function() {
|
||||
doc.registerElement('x-foo');
|
||||
}, 'new document should have a registration context');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,7 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
layer at (0,0) size 800x19
|
||||
RenderBlock {foo} at (0,0) size 800x19
|
||||
RenderText {#text} at (0,0) size 99x19
|
||||
text run at (0,0) width 99: "Hello World!"
|
||||
|
4
engine/src/flutter/tests/lowlevel/hello-world.html
Normal file
4
engine/src/flutter/tests/lowlevel/hello-world.html
Normal file
@ -0,0 +1,4 @@
|
||||
<foo>
|
||||
<link rel="import" href="../resources/dump-as-render-tree.html" />
|
||||
Hello World!
|
||||
</foo>
|
@ -0,0 +1,9 @@
|
||||
Running 5 tests
|
||||
ok 1 querySelector should find elements by class name
|
||||
ok 2 querySelector should find elements by id
|
||||
ok 3 querySelector should find elements by tag name
|
||||
ok 4 querySelector should find an element by compound selector
|
||||
ok 5 querySelector should find all elements by compound selector
|
||||
5 tests
|
||||
5 pass
|
||||
0 fail
|
62
engine/src/flutter/tests/lowlevel/query-selector.html
Normal file
62
engine/src/flutter/tests/lowlevel/query-selector.html
Normal file
@ -0,0 +1,62 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<div id="tests">
|
||||
<div id="id1">
|
||||
<div class="class2"></div>
|
||||
</div>
|
||||
<tag-name-3 class="class7" id="tag1"></tag-name-3>
|
||||
<tag-name-3 class="class7" id="tag2"></tag-name-3>
|
||||
<span class="class2">
|
||||
<span class="class5" id="id5"></span>
|
||||
</span>
|
||||
<div id="id5"></div>
|
||||
<tag-name-6 class="class6" id="id6">
|
||||
<tag-name-3 class="class7" id="tag2"></tag-name-3>
|
||||
</tag-name-6>
|
||||
</div>
|
||||
<script>
|
||||
function query(selector) { return document.querySelector(selector); }
|
||||
function queryAll(selector) { return document.querySelectorAll(selector); }
|
||||
|
||||
describe("querySelector", function() {
|
||||
it("should find elements by class name", function() {
|
||||
assert.ok(query(".class2"));
|
||||
assert.equal(query(".class2").classList.toString(), "class2");
|
||||
assert.equal(queryAll(".class2").length, 2);
|
||||
assert.equal(queryAll(".class2")[0].classList.toString(), "class2");
|
||||
assert.equal(queryAll(".class2")[1].classList.toString(), "class2");
|
||||
assert.notEqual(queryAll(".class2")[0], queryAll(".class2")[1]);
|
||||
});
|
||||
it("should find elements by id", function() {
|
||||
assert.ok(query("#id5"));
|
||||
assert.equal(query("#id5").id, "id5");
|
||||
assert.equal(query("#id5").classList.toString(), "class5");
|
||||
// FIXME(sky): Do we still want to allow multiple id stuff like this?
|
||||
assert.equal(queryAll("#id5").length, 2);
|
||||
assert.equal(queryAll("#id5")[0], query("#id5"));
|
||||
assert.notEqual(queryAll("#id5")[1], query("#id5"));
|
||||
assert.equal(queryAll("#id5")[1].id, "id5");
|
||||
});
|
||||
it("should find elements by tag name", function() {
|
||||
assert.ok(query("tag-name-6"));
|
||||
assert.equal(query("tag-name-6").tagName, "tag-name-6");
|
||||
assert.equal(query("tag-name-6").classList.toString(), "class6");
|
||||
var context = query("#tests");
|
||||
assert.equal(context.querySelectorAll("span").length, 2);
|
||||
});
|
||||
it("should find an element by compound selector", function() {
|
||||
assert.ok(query("tag-name-6.class6#id6"));
|
||||
assert.equal(query("tag-name-6.class6#id6").id, "id6");
|
||||
assert.equal(query("tag-name-6.class6#id6").classList.toString(), "class6");
|
||||
assert.equal(query("tag-name-6.class6#id6").tagName, "tag-name-6");
|
||||
});
|
||||
it("should find all elements by compound selector", function() {
|
||||
assert.ok(queryAll("tag-name-3.class7"));
|
||||
assert.equal(queryAll("tag-name-3.class7").length, 3);
|
||||
assert.equal(queryAll("tag-name-3.class7")[0].id, "tag1");
|
||||
assert.equal(queryAll("tag-name-3.class7")[1].id, "tag2");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
50
engine/src/flutter/tests/lowlevel/scrollbar-expected.txt
Normal file
50
engine/src/flutter/tests/lowlevel/scrollbar-expected.txt
Normal file
@ -0,0 +1,50 @@
|
||||
layer at (0,0) size 800x1500
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
layer at (0,0) size 800x1500
|
||||
RenderBlock {html} at (0,0) size 800x1500 [bgcolor=#FFC0CB]
|
||||
RenderBlock {div} at (0,0) size 800x100
|
||||
RenderText {#text} at (0,0) size 10x19
|
||||
text run at (0,0) width 10: "a"
|
||||
RenderBlock {div} at (0,100) size 800x100
|
||||
RenderText {#text} at (0,0) size 11x19
|
||||
text run at (0,0) width 11: "b"
|
||||
RenderBlock {div} at (0,200) size 800x100
|
||||
RenderText {#text} at (0,0) size 9x19
|
||||
text run at (0,0) width 9: "c"
|
||||
RenderBlock {div} at (0,300) size 800x100
|
||||
RenderText {#text} at (0,0) size 11x19
|
||||
text run at (0,0) width 11: "d"
|
||||
RenderBlock {div} at (0,400) size 800x100
|
||||
RenderText {#text} at (0,0) size 10x19
|
||||
text run at (0,0) width 10: "e"
|
||||
RenderBlock {div} at (0,500) size 800x100
|
||||
RenderText {#text} at (0,0) size 6x19
|
||||
text run at (0,0) width 6: "f"
|
||||
RenderBlock {div} at (0,600) size 800x100
|
||||
RenderText {#text} at (0,0) size 11x19
|
||||
text run at (0,0) width 11: "g"
|
||||
RenderBlock {div} at (0,700) size 800x100
|
||||
RenderText {#text} at (0,0) size 11x19
|
||||
text run at (0,0) width 11: "h"
|
||||
RenderBlock {div} at (0,800) size 800x100
|
||||
RenderText {#text} at (0,0) size 5x19
|
||||
text run at (0,0) width 5: "i"
|
||||
RenderBlock {div} at (0,900) size 800x100
|
||||
RenderText {#text} at (0,0) size 5x19
|
||||
text run at (0,0) width 5: "j"
|
||||
RenderBlock {div} at (0,1000) size 800x100
|
||||
RenderText {#text} at (0,0) size 10x19
|
||||
text run at (0,0) width 10: "k"
|
||||
RenderBlock {div} at (0,1100) size 800x100
|
||||
RenderText {#text} at (0,0) size 5x19
|
||||
text run at (0,0) width 5: "l"
|
||||
RenderBlock {div} at (0,1200) size 800x100
|
||||
RenderText {#text} at (0,0) size 16x19
|
||||
text run at (0,0) width 16: "m"
|
||||
RenderBlock {div} at (0,1300) size 800x100
|
||||
RenderText {#text} at (0,0) size 11x19
|
||||
text run at (0,0) width 11: "n"
|
||||
RenderBlock {div} at (0,1400) size 800x100
|
||||
RenderText {#text} at (0,0) size 10x19
|
||||
text run at (0,0) width 10: "o"
|
||||
|
21
engine/src/flutter/tests/lowlevel/scrollbar.html
Normal file
21
engine/src/flutter/tests/lowlevel/scrollbar.html
Normal file
@ -0,0 +1,21 @@
|
||||
<html style="background-color: pink">
|
||||
<link rel="import" href="../resources/dump-as-render-tree.html" />
|
||||
<style>
|
||||
div { height: 100px; }
|
||||
</style>
|
||||
<div>a</div>
|
||||
<div>b</div>
|
||||
<div>c</div>
|
||||
<div>d</div>
|
||||
<div>e</div>
|
||||
<div>f</div>
|
||||
<div>g</div>
|
||||
<div>h</div>
|
||||
<div>i</div>
|
||||
<div>j</div>
|
||||
<div>k</div>
|
||||
<div>l</div>
|
||||
<div>m</div>
|
||||
<div>n</div>
|
||||
<div>o</div>
|
||||
</html>
|
@ -0,0 +1,6 @@
|
||||
PASS: <div class= id=id1> order was 1
|
||||
PASS: <div class=class2 id=> order was 2
|
||||
PASS: <tag-name-3 class= id=> order was 3
|
||||
PASS: <div class=class4 class4 id=> order was 4
|
||||
PASS: <div class=class5 id=id5> order was 5
|
||||
PASS: <tag-name-6 class=class6 id=id6> order was 6
|
44
engine/src/flutter/tests/lowlevel/style-basic.html
Normal file
44
engine/src/flutter/tests/lowlevel/style-basic.html
Normal file
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel="import" href="../resources/dump-as-text.html" />
|
||||
<style>
|
||||
#id1 { order: 1; }
|
||||
.class2 { order: 2; }
|
||||
tag-name-3 { order: 3; }
|
||||
.class4.class4 { order: 4; }
|
||||
.class5#id5 { order: 5; }
|
||||
tag-name-6.class6#id6 { order: 6; }
|
||||
</style>
|
||||
<body>
|
||||
<div id="tests">
|
||||
<div id="id1"></div>
|
||||
<div class="class2"></div>
|
||||
<tag-name-3></tag-name-3>
|
||||
<div class="class4 class4"></div>
|
||||
<div class="class5" id="id5"></div>
|
||||
<tag-name-6 class="class6" id="id6"></tag-name-6>
|
||||
</div>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
var tests = document.getElementById("tests");
|
||||
var log = document.getElementById("log");
|
||||
var i = 1;
|
||||
for (var element = tests.firstElementChild; element; element = element.nextElementSibling, ++i) {
|
||||
var order = getComputedStyle(element).order;
|
||||
var div = document.createElement("div");
|
||||
var text = (order == i) ? "PASS" : "FAIL";
|
||||
text += ": <"
|
||||
+ element.tagName
|
||||
+ " class="
|
||||
+ element.classList
|
||||
+ " id=" + element.id
|
||||
+ "> order was "
|
||||
+ order;
|
||||
if (order != i)
|
||||
text += " expected " + i;
|
||||
div.textContent = text;
|
||||
log.appendChild(div);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 Specificity should not exist
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
19
engine/src/flutter/tests/lowlevel/style-specificity.html
Normal file
19
engine/src/flutter/tests/lowlevel/style-specificity.html
Normal file
@ -0,0 +1,19 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<style>
|
||||
#sandbox { color: red; }
|
||||
.blue { color: blue; }
|
||||
</style>
|
||||
<body>
|
||||
<div id="sandbox" class="blue">This should be blue.</div>
|
||||
<script>
|
||||
describe('Specificity', function() {
|
||||
it('should not exist', function() {
|
||||
var sandbox = document.getElementById("sandbox");
|
||||
assert.equal(getComputedStyle(sandbox).color, "rgb(0, 0, 255)");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
1
engine/src/flutter/tests/lowlevel/text-expected.txt
Normal file
1
engine/src/flutter/tests/lowlevel/text-expected.txt
Normal file
@ -0,0 +1 @@
|
||||
This is a dump-as-text test.
|
6
engine/src/flutter/tests/lowlevel/text.html
Normal file
6
engine/src/flutter/tests/lowlevel/text.html
Normal file
@ -0,0 +1,6 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/dump-as-text.html" />
|
||||
<body>
|
||||
This is a dump-as-text test.
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 This suite should run this test
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
20
engine/src/flutter/tests/mocha/describe-only.html
Normal file
20
engine/src/flutter/tests/mocha/describe-only.html
Normal file
@ -0,0 +1,20 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
|
||||
describe.only('This suite', function() {
|
||||
it('should run this test', function() {
|
||||
assert.ok(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('That suite', function() {
|
||||
it('should not run this test', function() {
|
||||
assert.ok(false);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</html>
|
5
engine/src/flutter/tests/mocha/it-only-expected.txt
Normal file
5
engine/src/flutter/tests/mocha/it-only-expected.txt
Normal file
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 This suite should only run this test
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
18
engine/src/flutter/tests/mocha/it-only.html
Normal file
18
engine/src/flutter/tests/mocha/it-only.html
Normal file
@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
|
||||
describe('This suite', function() {
|
||||
it.only('should only run this test', function() {
|
||||
assert.ok(true);
|
||||
});
|
||||
|
||||
it('should not run this test', function() {
|
||||
assert.ok(false);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</html>
|
1
engine/src/flutter/tests/modules/basic-expected.txt
Normal file
1
engine/src/flutter/tests/modules/basic-expected.txt
Normal file
@ -0,0 +1 @@
|
||||
PASS: pass.html succesfully exported this string.
|
8
engine/src/flutter/tests/modules/basic.html
Normal file
8
engine/src/flutter/tests/modules/basic.html
Normal file
@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/dump-as-text.html" />
|
||||
<link rel="import" href="resources/pass.html" as="hello" />
|
||||
<div id="result">FAIL</div>
|
||||
<script>
|
||||
document.getElementById("result").textContent = hello;
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1 @@
|
||||
{"message":"PASS: pass.html succesfully exported this string."}
|
7
engine/src/flutter/tests/modules/imports-can-import.html
Normal file
7
engine/src/flutter/tests/modules/imports-can-import.html
Normal file
@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<link rel="import" href="resources/intermediate.html" as="chocolate" />
|
||||
<div id="result">FAIL</div>
|
||||
<script>
|
||||
document.getElementById("result").textContent = JSON.stringify(chocolate);
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,7 @@
|
||||
<link rel="import" href="../../resources/dump-as-text.html" />
|
||||
<link rel="import" href="pass.html" as="banana" />
|
||||
<script>
|
||||
this.exports = {
|
||||
message: banana,
|
||||
};
|
||||
</script>
|
3
engine/src/flutter/tests/modules/resources/pass.html
Normal file
3
engine/src/flutter/tests/modules/resources/pass.html
Normal file
@ -0,0 +1,3 @@
|
||||
<script>
|
||||
this.exports = "PASS: pass.html succesfully exported this string."
|
||||
</script>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 MutationObserver should pass the callback and observer arguments
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
describe('MutationObserver', function() {
|
||||
it('should pass the callback and observer arguments', function(done) {
|
||||
var mutationObserver = new MutationObserver(function(mutations, observer) {
|
||||
assert.equal(this, mutationObserver);
|
||||
assert.equal(mutationObserver, observer);
|
||||
done();
|
||||
});
|
||||
var div = document.createElement('div');
|
||||
mutationObserver.observe(div, {attributes: true});
|
||||
div.setAttribute('foo', 'bar');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 Transient registrations should be cleared even without delivery
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
@ -0,0 +1,28 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
describe('Transient registrations', function() {
|
||||
it('should be cleared even without delivery', function(done) {
|
||||
var mutationsDelivered = false;
|
||||
var observer = new MutationObserver(function(mutations) {
|
||||
mutationsDelivered = true;
|
||||
});
|
||||
var div = document.createElement('div');
|
||||
var span = div.appendChild(document.createElement('span'));
|
||||
observer.observe(div, {attributes: true, subtree: true});
|
||||
div.removeChild(span);
|
||||
setTimeout(function() {
|
||||
// By the time this function runs the transient registration should
|
||||
// be cleared, so we expect not to be notified of this attribute
|
||||
// mutation.
|
||||
span.setAttribute('bar', 'baz');
|
||||
setTimeout(function() {
|
||||
assert.notOk(mutationsDelivered);
|
||||
done();
|
||||
}, 0);
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 MutationObservers must wait for the next loop when created during delivery
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
@ -0,0 +1,37 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
window.jsTestIsAsync = true;
|
||||
|
||||
describe('MutationObservers', function() {
|
||||
it ('must wait for the next loop when created during delivery', function(done) {
|
||||
var order = [];
|
||||
var div = document.createElement('div');
|
||||
|
||||
var observer3;
|
||||
var observer1 = new MutationObserver(function(mutations) {
|
||||
order.push(1);
|
||||
if (!observer3) {
|
||||
observer3 = new MutationObserver(function(mutations) {
|
||||
order.push(3);
|
||||
});
|
||||
observer3.observe(div, {attributes: true});
|
||||
div.setAttribute('foo', 'baz');
|
||||
}
|
||||
});
|
||||
var observer2 = new MutationObserver(function(mutations) {
|
||||
order.push(2);
|
||||
});
|
||||
|
||||
observer1.observe(div, {attributes: true});
|
||||
observer2.observe(div, {attributes: true});
|
||||
div.setAttribute('foo', 'bar');
|
||||
setTimeout(function() {
|
||||
assert.deepEqual(order, [1, 2, 1, 3]);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,6 @@
|
||||
Running 2 tests
|
||||
ok 1 MutationObserver cross document moves should handle basic observation
|
||||
ok 2 MutationObserver cross document moves should handle subtree observation
|
||||
2 tests
|
||||
2 pass
|
||||
0 fail
|
@ -0,0 +1,49 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
describe('MutationObserver cross document moves', function() {
|
||||
it('should handle basic observation', function(done) {
|
||||
var mutations;
|
||||
var div = document.createElement('div');
|
||||
var observer = new MutationObserver(function(records) {
|
||||
mutations = records;
|
||||
});
|
||||
|
||||
observer.observe(div, {attributes: true});
|
||||
var newDoc = document.implementation.createDocument('', '', null);
|
||||
newDoc.appendChild(div);
|
||||
div.id = 'foo';
|
||||
setTimeout(function() {
|
||||
assert.equal(mutations.length, 1);
|
||||
assert.equal(mutations[0].type, 'attributes');
|
||||
assert.equal(mutations[0].target, div);
|
||||
assert.equal(mutations[0].attributeName, 'id');
|
||||
observer.disconnect();
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
it('should handle subtree observation', function(done) {
|
||||
var mutations;
|
||||
var div = document.createElement('div');
|
||||
var subDiv = div.appendChild(document.createElement('div'));
|
||||
var observer = new MutationObserver(function(records) {
|
||||
mutations = records;
|
||||
});
|
||||
|
||||
observer.observe(div, {attributes: true, subtree: true});
|
||||
var newDoc = document.implementation.createDocument();
|
||||
newDoc.appendChild(div);
|
||||
subDiv.id = 'foo';
|
||||
setTimeout(function() {
|
||||
assert.equal(mutations.length, 1);
|
||||
assert.equal(mutations[0].type, 'attributes');
|
||||
assert.equal(mutations[0].target, subDiv);
|
||||
assert.equal(mutations[0].attributeName, 'id');
|
||||
observer.disconnect();
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 MutationObserver should deliver in order of creation
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
@ -0,0 +1,40 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
describe('MutationObserver', function() {
|
||||
it('should deliver in order of creation', function(done) {
|
||||
var order = [];
|
||||
var observers = [];
|
||||
|
||||
function setUpOrdering(num) {
|
||||
observers.push(new MutationObserver(function(mutations) {
|
||||
order.push(num);
|
||||
}));
|
||||
}
|
||||
|
||||
for (var i = 0; i < 10; ++i)
|
||||
setUpOrdering(i);
|
||||
|
||||
var div = document.createElement('div');
|
||||
observers[3].observe(div, {attributes: true});
|
||||
observers[2].observe(div, {characterData: true, subtree: true});
|
||||
observers[1].observe(div, {attributes: true});
|
||||
observers[7].observe(div, {childList: true});
|
||||
observers[4].observe(div, {attributes: true});
|
||||
observers[9].observe(div, {attributes: true});
|
||||
observers[0].observe(div, {childList: true});
|
||||
observers[5].observe(div, {attributes: true});
|
||||
observers[6].observe(div, {characterData: true, subtree: true});
|
||||
observers[8].observe(div, {attributes: true});
|
||||
div.setAttribute('foo', 'bar');
|
||||
div.appendChild(document.createTextNode('hello'));
|
||||
div.firstChild.textContent = 'goodbye';
|
||||
setTimeout(function() {
|
||||
assert.deepEqual(order, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 MutationObserver.disconnect should cancel pending delivery
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
@ -0,0 +1,44 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
describe('MutationObserver.disconnect', function() {
|
||||
it('should cancel pending delivery', function(done) {
|
||||
var mutations;
|
||||
var observer;
|
||||
var div;
|
||||
|
||||
function start() {
|
||||
mutations = null;
|
||||
div = document.createElement('div');
|
||||
|
||||
observer = new MutationObserver(function(m) {
|
||||
mutations = m;
|
||||
});
|
||||
|
||||
observer.observe(div, { attributes: true });
|
||||
div.setAttribute('foo', 'bar');
|
||||
observer.disconnect();
|
||||
setTimeout(next, 0);
|
||||
}
|
||||
|
||||
function next() {
|
||||
// Disconnecting should cancel any pending delivery...
|
||||
assert.equal(mutations, null);
|
||||
observer.observe(div, { attributes: true });
|
||||
div.setAttribute('bar', 'baz');
|
||||
setTimeout(finish, 0);
|
||||
}
|
||||
|
||||
function finish() {
|
||||
// ...and re-observing should not see any of the previously-generated records.
|
||||
assert.equal(mutations.length, 1);
|
||||
assert.equal(mutations[0].attributeName, "bar");
|
||||
done();
|
||||
}
|
||||
|
||||
start();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,7 @@
|
||||
Running 3 tests
|
||||
ok 1 DocumentFragments should remove all children of the fragment before moving children, using appendChild
|
||||
ok 2 DocumentFragments should remove all children of the fragment before moving children, using insertBefore
|
||||
ok 3 DocumentFragments should remove all children of the fragment before moving children, using replaceChild
|
||||
3 tests
|
||||
3 pass
|
||||
0 fail
|
@ -0,0 +1,69 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<script>
|
||||
describe('DocumentFragments should remove all children of the fragment before moving children, ', function() {
|
||||
var mutations;
|
||||
var observer;
|
||||
|
||||
beforeEach(function() {
|
||||
mutations = null;
|
||||
observer = new MutationObserver(function(records) {
|
||||
mutations = records;
|
||||
});
|
||||
});
|
||||
|
||||
function createObservedFragment() {
|
||||
var fragment = document.createDocumentFragment();
|
||||
fragment.appendChild(document.createElement('b'));
|
||||
fragment.appendChild(document.createElement('i'));
|
||||
observer.observe(fragment, {childList: true});
|
||||
return fragment;
|
||||
}
|
||||
|
||||
it('using appendChild', function(done) {
|
||||
var div = document.createElement('div');
|
||||
observer.observe(div, {childList: true});
|
||||
div.appendChild(createObservedFragment());
|
||||
setTimeout(function() {
|
||||
assert.equal(mutations.length, 2);
|
||||
assert.equal(mutations[0].addedNodes.length, 0);
|
||||
assert.equal(mutations[0].removedNodes.length, 2);
|
||||
assert.equal(mutations[1].addedNodes.length, 2);
|
||||
assert.equal(mutations[1].removedNodes.length, 0);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('using insertBefore', function(done) {
|
||||
var div = document.createElement('div');
|
||||
div.appendChild(document.createElement('span'));
|
||||
observer.observe(div, {childList: true});
|
||||
div.insertBefore(createObservedFragment(), div.firstChild);
|
||||
setTimeout(function() {
|
||||
assert.equal(mutations.length, 2);
|
||||
assert.equal(mutations[0].addedNodes.length, 0);
|
||||
assert.equal(mutations[0].removedNodes.length, 2);
|
||||
assert.equal(mutations[1].addedNodes.length, 2);
|
||||
assert.equal(mutations[1].removedNodes.length, 0);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('using replaceChild', function(done) {
|
||||
var div = document.createElement('div');
|
||||
div.appendChild(document.createElement('span'));
|
||||
observer.observe(div, {childList: true});
|
||||
div.replaceChild(createObservedFragment(), div.firstChild);
|
||||
setTimeout(function() {
|
||||
assert.equal(mutations.length, 2);
|
||||
assert.equal(mutations[0].addedNodes.length, 0);
|
||||
assert.equal(mutations[0].removedNodes.length, 2);
|
||||
assert.equal(mutations[1].addedNodes.length, 2);
|
||||
assert.equal(mutations[1].removedNodes.length, 1);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 MutationObserver should not interrupt delivery order on getting mutations during delivery
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
@ -0,0 +1,34 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
describe('MutationObserver', function() {
|
||||
it('should not interrupt delivery order on getting mutations during delivery', function(done) {
|
||||
function finish() {
|
||||
assert.deepEqual(order, [1, 3, 2]);
|
||||
done();
|
||||
}
|
||||
|
||||
var order = [];
|
||||
var div = document.createElement('div');
|
||||
|
||||
var observer1 = new MutationObserver(function(mutations) {
|
||||
order.push(1);
|
||||
div.appendChild(document.createElement('span'));
|
||||
});
|
||||
var observer2 = new MutationObserver(function(mutations) {
|
||||
order.push(2);
|
||||
});
|
||||
var observer3 = new MutationObserver(function(mutations) {
|
||||
order.push(3);
|
||||
});
|
||||
|
||||
observer1.observe(div, {attributes: true});
|
||||
observer2.observe(div, {childList: true});
|
||||
observer3.observe(div, {attributes: true});
|
||||
div.setAttribute('foo', 'bar');
|
||||
setTimeout(finish, 0);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1 @@
|
||||
PASS. We didn't crash
|
@ -0,0 +1,15 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/dump-as-text.html" />
|
||||
<body id="body">
|
||||
<script>
|
||||
function mutationCallback(mutations, observer) {
|
||||
mutations[0].addedNodes[-1];
|
||||
}
|
||||
|
||||
var mutationObserver = new MutationObserver(mutationCallback);
|
||||
var body = document.getElementById("body");
|
||||
mutationObserver.observe(body, {childList: true});
|
||||
body.appendChild(document.createTextNode("PASS. We didn't crash"));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,6 @@
|
||||
Running 2 tests
|
||||
ok 1 MutationObserver should have methods
|
||||
ok 2 MutationObserver should throw with incorrect constructor args
|
||||
2 tests
|
||||
2 pass
|
||||
0 fail
|
@ -0,0 +1,28 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
describe('MutationObserver', function() {
|
||||
var observer = new MutationObserver(function(mutations) { });
|
||||
|
||||
it('should have methods', function() {
|
||||
assert.equal(typeof observer.observe, 'function');
|
||||
assert.equal(typeof observer.disconnect, 'function');
|
||||
});
|
||||
it('should throw with incorrect constructor args', function() {
|
||||
assert.throw(function() {
|
||||
new MutationObserver({ handleEvent: function() {} });
|
||||
}, TypeError);
|
||||
assert.throw(function() {
|
||||
new MutationObserver({});
|
||||
}, TypeError);
|
||||
assert.throw(function() {
|
||||
new MutationObserver(42);
|
||||
}, TypeError);
|
||||
assert.throw(function() {
|
||||
new MutationObserver("foo");
|
||||
}, TypeError);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 MutationRecord should be exposed on window but not constructable
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
@ -0,0 +1,22 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
describe('MutationRecord', function() {
|
||||
it('should be exposed on window but not constructable', function() {
|
||||
assert.ok(window.MutationRecord);
|
||||
assert.equal(typeof MutationRecord, "function");
|
||||
assert.throw(function() {
|
||||
new MutationRecord
|
||||
}, TypeError);
|
||||
|
||||
var div = document.createElement('div');
|
||||
var observer = new MutationObserver(function(){});
|
||||
observer.observe(div, {attributes: true});
|
||||
div.id = 'foo';
|
||||
var record = observer.takeRecords()[0];
|
||||
assert.ok(record instanceof MutationRecord);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,7 @@
|
||||
Running 3 tests
|
||||
ok 1 Non-relevant properties on mutation records should be null, except for NodeLists, which should be empty on characterData records
|
||||
ok 2 Non-relevant properties on mutation records should be null, except for NodeLists, which should be empty on childList records
|
||||
ok 3 Non-relevant properties on mutation records should be null, except for NodeLists, which should be empty on attribute records
|
||||
3 tests
|
||||
3 pass
|
||||
0 fail
|
@ -0,0 +1,42 @@
|
||||
<html>
|
||||
<link rel="import" href="../resources/chai.html" />
|
||||
<link rel="import" href="../resources/mocha.html" />
|
||||
<script>
|
||||
describe('Non-relevant properties on mutation records should be null, except for NodeLists, which should be empty', function() {
|
||||
|
||||
var observer = new MutationObserver(function() {});
|
||||
|
||||
it('on characterData records', function() {
|
||||
var text = document.createTextNode('something');
|
||||
observer.observe(text, {characterData: true});
|
||||
text.data = 'something else';
|
||||
var record = observer.takeRecords()[0];
|
||||
assert.isNull(record.attributeName);
|
||||
assert.isNull(record.oldValue);
|
||||
assert.isNull(record.previousSibling);
|
||||
assert.isNull(record.nextSibling);
|
||||
assert.equal(record.addedNodes.length, 0);
|
||||
assert.equal(record.removedNodes.length, 0);
|
||||
});
|
||||
it('on childList records', function() {
|
||||
var div = document.createElement('div');
|
||||
observer.observe(div, {childList: true});
|
||||
div.appendChild(document.createElement('span'));
|
||||
record = observer.takeRecords()[0];
|
||||
assert.isNull(record.attributeName);
|
||||
assert.isNull(record.oldValue);
|
||||
});
|
||||
it('on attribute records', function() {
|
||||
var div = document.createElement('div');
|
||||
observer.observe(div, {attributes: true});
|
||||
div.setAttribute('data-foo', 'bar');
|
||||
record = observer.takeRecords()[0];
|
||||
assert.isNull(record.oldValue);
|
||||
assert.isNull(record.previousSibling);
|
||||
assert.isNull(record.nextSibling);
|
||||
assert.equal(record.addedNodes.length, 0);
|
||||
assert.equal(record.removedNodes.length, 0);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,19 @@
|
||||
Running 15 tests
|
||||
ok 1 MutationObserver.observe on attributes should handle basic aspects of attribute observation
|
||||
ok 2 MutationObserver.observe on attributes should not notify of attribute changes without asking
|
||||
ok 3 MutationObserver.observe on attributes re-observing the same node with the same observer has the effect of resetting the options
|
||||
ok 4 MutationObserver.observe on attributes multiple observers can be registered to a given node and both receive mutations
|
||||
ok 5 MutationObserver.observe on attributes should deliver mutations on modifications to node properties which delegate to attribute storage
|
||||
ok 6 MutationObserver.observe on attributes should handle basic oldValue delivery
|
||||
ok 7 MutationObserver.observe on attributes should deliver oldValue when needed
|
||||
ok 8 MutationObserver.observe on attributes should give attributeOldValue if any entries request it with multiple observers
|
||||
ok 9 MutationObserver.observe on attributes should handle setting an attribute via reflected IDL attribute
|
||||
ok 10 MutationObserver.observe on attributes should respect attributeFilter on HTML elements
|
||||
ok 11 MutationObserver.observe on attributes should respect different attributeFilters when observing multiple subtree nodes
|
||||
ok 12 MutationObserver.observe on attributes should create records for the style property
|
||||
ok 13 MutationObserver.observe on attributes should have oldValue for style property mutations
|
||||
ok 14 MutationObserver.observe on attributes should not create records for noop style property mutation
|
||||
ok 15 MutationObserver.observe on attributes should create records when mutating through the attribute collection
|
||||
15 tests
|
||||
15 pass
|
||||
0 fail
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user